📄 frmin_jsfs.frm
字号:
Key = "Delete"
Object.ToolTipText = "删除"
ImageIndex = 4
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "Save"
Object.ToolTipText = "保存"
ImageIndex = 5
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "取消"
Key = "Cancel"
Object.ToolTipText = "取消"
ImageIndex = 6
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "Help"
Object.ToolTipText = "帮助"
ImageIndex = 7
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "Exit"
Object.ToolTipText = "退出"
ImageIndex = 8
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComctlLib.TreeView tvwJs
Height = 5415
Left = 45
TabIndex = 0
Top = 630
Width = 3525
_ExtentX = 6218
_ExtentY = 9551
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Sorted = -1 'True
Style = 7
ImageList = "ImageList2"
Appearance = 1
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuPrint
Caption = "打印(&P)"
Shortcut = ^P
End
Begin VB.Menu mnuPreview
Caption = "预览(&V)"
End
Begin VB.Menu mnuDiv1
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuEdit
Caption = "编辑(&E)"
Begin VB.Menu mnuNew
Caption = "增加(&N)"
Shortcut = ^N
End
Begin VB.Menu mnuDelete
Caption = "删除(&D)"
Shortcut = ^D
End
Begin VB.Menu mnuSave
Caption = "保存(&S)"
Shortcut = ^S
End
Begin VB.Menu mnuDiv2
Caption = "-"
End
Begin VB.Menu mnuCancel
Caption = "取消(&C)"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpHelp
Caption = "帮助(&H)"
Shortcut = {F1}
End
End
End
Attribute VB_Name = "frmIN_Jsfs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rstJs As ADODB.Recordset '结算方式表
Private rstJsJc As ADODB.Recordset '结算方式级次
Private LevLen As Integer '级数总长
Private Sub cmdIcon_Click()
If cmdIcon.Caption = "小图标" Then
lvwJs.View = lvwSmallIcon
cmdIcon.Caption = "大图标"
Else
lvwJs.View = lvwIcon
cmdIcon.Caption = "小图标"
End If
End Sub
Private Sub form_load()
Dim sLevel As String
Set rstJs = New ADODB.Recordset
rstJs.CursorLocation = adUseClient
rstJs.Open "select * from tZW_Jsfs" & glo.sOperateYear & " order by cCode", glo.cnnMain, adOpenStatic, adLockOptimistic
Set rstJsJc = New ADODB.Recordset
rstJsJc.CursorLocation = adUseClient
rstJsJc.Open "select * from tUSU_DMJS where type='结算'", _
glo.cnnMain, adOpenStatic, adLockOptimistic
With rstJsJc
If Not .BOF Then .MoveFirst
sLevel = ""
While Not .EOF
sLevel = sLevel & String(.Fields("WS"), "*") & " "
.MoveNext
Wend
LevLen = 0
If Not .BOF Then .MoveFirst
While Not .EOF
LevLen = LevLen + .Fields("WS")
.MoveNext
Wend
End With
sbrLevel.Panels(2) = sLevel
'装载树
tvwJs.Nodes.Add , , "R", "结算方式", "Root"
tvwJs.Nodes("R").Expanded = True
LoadTvw rstJs, tvwJs, "R", "cCode", "cName", "Collapse", "Expand", "bEnd"
tbrJs.Buttons("Cancel").Enabled = False
tbrJs.Buttons("Save").Enabled = False
tbrJs.Buttons("Delete").Enabled = False
mnuCancel.Enabled = False
mnuSave.Enabled = False
mnuDelete.Enabled = False
If rstJs.BOF And rstJs.EOF Then
tbrJs.Buttons("Delete").Enabled = False '空表不能删除
mnuDelete.Enabled = False
End If
Cllr.Login "南京伊康计算机工程公司", "11010504", "0060-1733-7722-3004"
End Sub
Private Sub PrintMfg2(m_mFg As MSFlexGrid, sTitle As String)
'打印MFG控建
Dim rr As Long
Dim cc As Long
If m_mFg.Rows < 1 Then Exit Sub
If Printers.Count = 0 Then MsgBox "未安装打印机。", vbInformation: Exit Sub
Cllr.OpenFile App.Path & "\CellFiles\Jsfs.cll", ""
Cllr.ResetContent
Cllr.SetRows m_mFg.Rows + 3, 0
Cllr.SetCols m_mFg.Cols + 2, 0
Cllr.s 1, 1, 0, sTitle
Cllr.SetCellAlign 1, 1, 0, 32 + 4
Cllr.SetCellFontStyle 1, 1, 0, 2
Cllr.MergeCells 1, 1, Cllr.GetCols(0) - 1, 1
Cllr.SetCellFontSize 1, 1, 0, 16
Cllr.SetRowHeight 1, 28, 1, 0
Cllr.s 1, 2, 0, glo.sOperateYear + "年"
Cllr.SetCellAlign 1, 2, 0, 32 + 4
Cllr.SetCellFontStyle 1, 2, 0, 2
Cllr.MergeCells 1, 2, Cllr.GetCols(0) - 1, 2
Cllr.SetCellFontSize 1, 2, 0, 12
Cllr.SetRowHeight 1, Cllr.GetRowBestHeight(2), 2, 0
Cllr.PrintSetHead "", "", "总&S页 第&P页"
Cllr.PrintSetFoot "单位:" + GetEnterpriseName(""), "", "打印日期:" + glo.sOperateDate
Cllr.DrawGridLine 1, 3, m_mFg.Cols, m_mFg.Rows + 2, 0, 2, 0
For cc = 0 To m_mFg.Cols - 1
Cllr.SetColWidth 1, m_mFg.ColWidth(cc) / 13, cc + 1, 0
Cllr.SetCellAlign cc + 1, 3, 0, 32 + 4
Next cc
For rr = 0 To m_mFg.Rows - 1
For cc = 0 To m_mFg.Cols - 1
Cllr.s cc + 1, rr + 3, 0, Trim(m_mFg.TextMatrix(rr, cc))
Next cc
Next rr
Cllr.PrintSheet 0, 0
Cllr.SaveFile App.Path & "\CellFiles\Jsfs.cll", 0
End Sub
Private Sub PrintMfg(m_mFg As MSFlexGrid, sTitle As String)
'打印MFG控建
Dim rr As Long
Dim cc As Long
If m_mFg.Rows < 1 Then Exit Sub
If Printers.Count = 0 Then MsgBox "未安装打印机。", vbInformation: Exit Sub
Cllr.OpenFile App.Path & "\CellFiles\Jsfs.cll", ""
Cllr.ResetContent
Cllr.SetRows m_mFg.Rows + 3, 0
Cllr.SetCols m_mFg.Cols + 2, 0
Cllr.s 1, 1, 0, sTitle
Cllr.SetCellAlign 1, 1, 0, 32 + 4
Cllr.SetCellFontStyle 1, 1, 0, 2
Cllr.MergeCells 1, 1, Cllr.GetCols(0) - 1, 1
Cllr.SetCellFontSize 1, 1, 0, 16
Cllr.SetRowHeight 1, 28, 1, 0
Cllr.s 1, 2, 0, glo.sOperateYear + "年度"
Cllr.SetCellAlign 1, 2, 0, 32 + 4
Cllr.SetCellFontStyle 1, 2, 0, 2
Cllr.MergeCells 1, 2, Cllr.GetCols(0) - 1, 2
Cllr.SetCellFontSize 1, 2, 0, 12
Cllr.SetRowHeight 1, Cllr.GetRowBestHeight(2), 2, 0
Cllr.PrintSetHead "", "", "第&P页"
Cllr.PrintSetFoot "单位:" + GetEnterpriseName(""), "", "打印日期:" + glo.sOperateDate
Cllr.DrawGridLine 1, 3, m_mFg.Cols, m_mFg.Rows + 2, 0, 2, 0
For cc = 0 To m_mFg.Cols - 1
Cllr.SetColWidth 1, m_mFg.ColWidth(cc) / 13, cc + 1, 0
Cllr.SetCellAlign cc + 1, 3, 0, 32 + 4
Next cc
For rr = 0 To m_mFg.Rows - 1
For cc = 0 To m_mFg.Cols - 1
Cllr.s cc + 1, rr + 3, 0, Trim(m_mFg.TextMatrix(rr, cc))
Next cc
Next rr
Cllr.PrintPreview 1, 0
Cllr.SaveFile App.Path & "\CellFiles\Jsfs.cll", 0
End Sub
Private Sub lvwJs_ItemClick(ByVal Item As MSComctlLib.ListItem)
tvwJs.Nodes(Item.Key).Selected = True
tvwJs_NodeClick tvwJs.Nodes(Item.Key)
End Sub
Private Sub mnuCancel_Click()
Call Operate("CANCEL")
End Sub
Private Sub mnuDelete_Click()
Call Operate("DELETE")
End Sub
Private Sub mnuExit_Click()
Unload Me
Unload frmUSU_Print
End Sub
Private Sub mnuHelpHelp_Click()
Call Operate("HELP")
End Sub
Private Sub mnuNew_Click()
Call Operate("ADD")
End Sub
Private Sub mnuPreview_Click()
Call Operate("PREVIEW")
End Sub
Private Sub mnuPrint_Click()
Call Operate("PRINT")
End Sub
Private Sub mnuSave_Click()
Call Operate("SAVE")
End Sub
Private Sub tbrJs_ButtonClick(ByVal Button As MSComctlLib.Button)
Call Operate(UCase(Button.Key))
End Sub
Private Sub PrintAll(strPrt As String)
Dim frmP As frmPreview
Dim rstAllJs As New ADODB.Recordset
Dim iRC As Integer
If Printers.Count = 0 Then
MsgBox "未安装打印机。", vbInformation
Exit Sub
End If
rstAllJs.CursorLocation = adUseClient
rstAllJs.Open "select * from tZW_Jsfs" & glo.sOperateYear, glo.cnnMain, adOpenStatic, adLockOptimistic
With frmUSU_Print.mfgPrt
.FormatString = " 结算方式编码 | 结算方式名称 | 票据管理 "
.Rows = rstAllJs.RecordCount + 1
.Cols = 3
.row = 0
For iRC = 0 To 2
.col = iRC
.CellAlignment = 4
.CellFontBold = True
Next iRC
.ColWidth(0) = 5 * 250
.ColWidth(1) = 2500
.ColWidth(2) = 6 * 250
iRC = 1
If Not rstAllJs.BOF Then rstAllJs.MoveFirst
While Not rstAllJs.EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -