📄 cbill_bosshow.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "CBill_BOSShow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Description = "This is BillEvent Interface Class, made by K3BOSPLUGINSWIZAED"
'定义 BillEvent 接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_BillInterface As BillEvent
Attribute m_BillInterface.VB_VarHelpID = -1
Public Sub Show(ByVal oBillInterface As Object)
'BillEvent 接口实现
'注意: 此方法必须存在, 请勿修改
Set m_BillInterface = oBillInterface
End Sub
Private Sub Class_Terminate()
'释放接口对象
'注意: 此方法必须存在, 请勿修改
Set m_BillInterface = Nothing
End Sub
Private Sub m_BillInterface_AfterLoadBill()
If bBilledit Then
'如果是点了序事簿变更按钮的话,则在打开单据时使保存按钮可见和可用属性变为真
m_BillInterface.SetBarStatus "mnuFileSave", "Visible", True
m_BillInterface.SetBarStatus "mnuFileSave", "Enabled", True
'刷新菜单对象
m_BillInterface.MenuBar.Refresh
'重新赋单据的标题
m_BillInterface.SetBillFormCaption m_BillInterface.BillName & "-变更"
'm_billinterface.billentrys(1)(1)
End If
End Sub
'Private Sub m_BillInterface_BeforeSelBills(ByVal lSelBillType As Long, ByVal oDataSrv As Object, ByVal dctLink As Object, sFilter As String, dctParam As Object)
' If lSelBillType = -72 Then
' sFilter = "v1.FCheckerID>0 and v1.FHeadSelfP0334>0"
' Else
' sFilter = "v1.FCheckerID>0 and v1.FHeadSelft0232>0"
' End If
'End Sub
Private Sub m_BillInterface_AfterNewBill()
'改变默认分录行数为2000行
m_BillInterface.BillEntrys(1).MaxRows = 2000
'新增时插入一行
'注意:对于基础类型的字段只要提供代码即可,而不是内码
m_BillInterface.InsertNewRowAndFill 2, 1, "FItemid", "01.001", "FMustQty", 100, "FCommitQty", 100, "FPrice", 1500
End Sub
'描述: 单据打开事件前处理函数
'版本: V10 0.3
'作者: Christin
'参数:
'返回值:
'创建时间: 2006-06-12
Private Sub m_BillInterface_BeforLoadBillFillData()
If bBilledit Then
'如果是点了序事簿变更按钮则将单据状态改为可修改
'注意:改变状态的语句只有放在此事件中只能起作用,放在afterload事件无效
m_BillInterface.BillCtl.BillStatus = Enu_BillStatusExt_Modify
End If
End Sub
Private Sub m_BillInterface_Change(ByVal dct As KFO.IDictionary, ByVal dctFld As KFO.IDictionary, ByVal Col As Long, ByVal Row As Long, Cancel As Boolean)
'如果单据头金额字段大于10000,则将单据头备注字段锁定
If UCase(dct("FKey")) = "FTOTALAMOUNT" Then
If dctFld("FFLD") > 10000 Then
m_BillInterface.BillHeads(1).BOSFields("FNote").FieldLock = True
Else
m_BillInterface.BillHeads(1).BOSFields("FNote").FieldLock = False
End If
End If
End Sub
Private Sub m_BillInterface_MenuBarInitialize(ByVal oMenuBar As K3ClassEvents.MenuBar)
Dim oBand As K3ClassEvents.BOSBand
Dim oTool As K3ClassEvents.BOSTool
'增加复制菜单在工具栏上的显示
Set oTool = oMenuBar.BOSTools("mnuEditCopy")
With oTool
.Caption = "复制"
.ToolTipText = "复制"
.Description = "复制"
.BeginGroup = False
'清空剪贴板里的内容
Clipboard.Clear
'从资源文件从读取预先保存的图片 须注意此处客户内存不足时有可能执行失败
Clipboard.SetData LoadResPicture(101, vbResBitmap), vbCFBitmap
.PasteToolFace
End With
Set oBand = oMenuBar.BOSBands("BandToolBar")
oBand.BOSTools.InsertBefore "mnuCaculate", oTool '将菜单对象插入指定工具栏
'隐藏页面设置菜单
Set oBand = oMenuBar.BOSBands("mnuFile")
Set oTool = oBand.BOSTools("mnuFilePageSetup")
With oTool
.Visible = False
.Enabled = True
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -