📄 +
字号:
ImageIndex = 9
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "fh"
ImageIndex = 10
EndProperty
EndProperty
BorderStyle = 1
Begin MSComctlLib.Toolbar GsToolbar
Height = 525
Left = 8520
TabIndex = 7
Top = -30
Width = 1695
_ExtentX = 2990
_ExtentY = 926
ButtonWidth = 1455
ButtonHeight = 926
AllowCustomize = 0 'False
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 2
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存格式"
Key = "bcgs"
ImageIndex = 11
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "默认列宽"
Key = "hfmrgs"
ImageIndex = 12
EndProperty
EndProperty
End
End
Begin MSComctlLib.ImageList ImageList1
Left = 7380
Top = 960
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 13
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1E30C
Key = "sz"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1E6A6
Key = "dy"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1EA40
Key = "yl"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1EDDA
Key = "xg"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1F174
Key = "zh"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1F50E
Key = "sh"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1F8A8
Key = "bc"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1FC42
Key = "fq"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":1FFDC
Key = "bz"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":20376
Key = "tc"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":20710
Key = "bcgs"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":20AAA
Key = "mrlk"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "基础设置_归集关系设置.frx":20E44
Key = "xsxm"
EndProperty
EndProperty
End
Begin VB.Label Lab_Pzclzt
BackColor = &H0000FFFF&
Caption = "2"
ForeColor = &H00808080&
Height = 322
Left = 9012
TabIndex = 2
Top = 553
Visible = 0 'False
Width = 403
End
Begin VB.Label Lab_OperStatus
BackColor = &H000080FF&
Caption = "1"
Height = 353
Left = 8684
TabIndex = 0
Top = 553
Visible = 0 'False
Width = 343
End
Begin VB.Line Line1
BorderColor = &H000000FF&
Index = 0
X1 = 4234
X2 = 7211
Y1 = 1108
Y2 = 1108
End
Begin VB.Line Line1
BorderColor = &H000000FF&
Index = 1
X1 = 4234
X2 = 7211
Y1 = 1153
Y2 = 1153
End
End
Attribute VB_Name = "JC_FrmGatherSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*********************************************************************************************************
'* 模 块 名 称 :归集关系设置
'* 功 能 描 述 :归集关系设置
'* 程序员姓名 :xjl
'* 最后修改人 :xjl
'* 最后修改时间:2002/1/22
'* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
'*********************************************************************************************************
'[以下为根据实际情况设置变量
Dim Rec_AutoTranItem As New ADODB.Recordset '转帐项目动态集
Dim jsqte As Long '临时计数器
Dim SqlStr As String '临时的SQL字符串
Dim RecTemp As New ADODB.Recordset '临时使用动态集
Dim Combo_CostCellCode() As String '成本中心COMBO
Dim IsShowBill As Boolean
Dim Str_RightEdit As String '编辑权限索引
']
'以下为固定使用变量(网格)
Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
Dim GridCode As String '显示网格网格代码
Dim GridInf() As Variant '整个网格设置信息
Dim ReportTitle As String '报表主标题
Dim Tsxx As String '系统提示信息
Dim Pmbcsjhs As Long '屏幕网格保持数据行数(大于等于1)
Dim Fzxwghs As Integer '辅助项网格行数(包括合计行)
Dim Sfxshjwg As Boolean '是否显示合计网格
Dim Qslz As Long '网格隐藏(非操作显示)列数
Dim Sjhgd As Double '网格数据行高度
Dim GridBoolean() As Boolean '网格列信息(布尔型)
Dim GridStr() As String '网格列信息(字符型)
Dim GridInt() As Integer '网格列信息(整型)
Dim Sfblbzkd As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
Dim Dqlrwgh As Long '当前录入数据网格行
Dim Dqlrwgl As Long '当前录入数据网格列
Dim Dqlkwgh As Long '刚刚离开网格行(不一定为录入行)
Dim Dqlkwgl As Long '刚刚离开网格列
Dim Dqtoprow As Long '当前录入状态时最上端可视行
Dim Dqleftcol As Long '当前录入状态时最左端可视列
Dim Zdlrqnr As String '字段录入修改前内容(用来判断内容是否修改)
Dim Wbkbhlock As Boolean '文本框改变值锁
Dim Changelock As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
Dim Gdtlock As Boolean '滚动条滚动控制(用来区别用户改变.程序改变)
Dim Yxxpdlock As Boolean '字段有效性判断锁(内容不修改不需进行字段有效性判断)
Dim Hyxxpdlock As Boolean '行有效性判断锁(字段内容不修改不需进行行有效性判断)
Dim Valilock As Boolean '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
Dim Shsfts As Boolean '删除记录行是否提示
Dim Szzls As Integer '网格信息数组最大下标值(网格列数-1)
Private Sub Combo_CostCell_Click() '进行查询
If IsShowBill = True Then
Call Sub_Query
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
Dim jdzygs As Integer
jdzygs = 3
Select Case KeyAscii
Case vbKeyReturn
If Kjjdzy(jdzygs) Then
KeyAscii = 0
End If
Case 39 '屏蔽字符"'"
KeyAscii = 0
End Select
End Sub
Private Sub Form_Load() '窗 体 装 入
'初始化各种锁值
Changelock = False '网格行列改变控制锁
Gdtlock = False '滚动条滚动控制
Yxxpdlock = True '字段有效性判断锁
Hyxxpdlock = True '行有效性判断锁
Wbkbhlock = False '文本框内容改变锁
IsShowBill = False
'报表主标题及报表编码
ReportTitle = "归集关系设置"
XtReportCode = "Cb_GatherSet"
Load Dyymctbl
'调 入 网 格
GridCode = "Cb_GatherSet" '网格属性编码
Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
Qslz = GridInf(1)
Sjhgd = GridInf(2)
Pmbcsjhs = GridInf(3)
Fzxwghs = GridInf(4)
Sfblbzkd = GridInf(5)
Shsfts = GridInf(6)
Sfxshjwg = GridInf(7)
Szzls = WglrGrid.Cols - 1
For jsqte = WglrGrid.FixedRows To WglrGrid.Rows - 1
WglrGrid.RowHeight(jsqte) = Sjhgd
Next jsqte
'设置操作状态为浏览
Lab_OperStatus.Caption = "1"
'初始化成本中心
Call CshCostCenter
If Combo_CostCell.ListCount > 0 Then
'设置工具条状态
Call Sub_OperStatus("11")
'显示信息
Call Sub_Query
Else
Call Sub_OperStatus("10")
End If
IsShowBill = True
'编辑(新增、修改、删除)权限索引
Str_RightEdit = "Cb_GatherSet_Edit"
End Sub
Private Sub Form_Unload(Cancel As Integer) '窗体卸载
'卸载打印页面窗体
Unload Dyymctbl
Set Rec_AutoTranItem = Nothing
Set RecTemp = Nothing
End Sub
Private Sub Sub_Query() '显示查询信息
WglrGrid.Redraw = False
SqlStr = "Select A.ItemCode,B.ItemName,A.QuGatherFormula,A.MoGatherFormula From Cb_GatherSet A " _
& "Left Outer Join Cb_CostItem B On A.ItemCode=B.ItemCode " _
& "Where CenterCode='" + Trim(Combo_CostCellCode(Combo_CostCell.ListIndex)) + "' Order By A.ItemCode"
Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
With RecTemp
WglrGrid.Rows = WglrGrid.FixedRows
jsqte = WglrGrid.FixedRows
Do While Not .EOF
'[>>显示
WglrGrid.AddItem ""
WglrGrid.TextMatrix(jsqte, 0) = "*" '行标识
WglrGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("ItemCode") & "") '项目编码
WglrGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("ItemName") & "") '项目名称
WglrGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("QuGatherFormula") & "") '数量计算公式
WglrGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("MoGatherFormula") & "") '金额计算公式
'<<]
WglrGrid.RowHeight(jsqte) = Sjhgd
.MoveNext
jsqte = jsqte + 1
Loop
End With
WglrGrid.Redraw = True
'调整网格,保持1录入行,提供屏幕保持行数.
Call Sub_AdjustGrid
End Sub
Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button) '用户点击工具条
'屏蔽文本框,下拉组合框有效性判断,即在网格单元内录入数据时,点帮助信息等,不执行文本框等验证,即不执行YdText或YdCombo的LostFocus事件.
Valilock = True
'屏蔽网格失去焦点产生的有效性判断
Changelock = True
Select Case Button.Key
Case "ymsz" '页面设置
Dyymctbl.Show 1
Case "yl" '预 览
If Fun_Drfrmyxxpd Then Call bbyl(True)
Case "dy" '打 印
If Fun_Drfrmyxxpd Then Call bbyl(False)
Case "xg" '修 改
Call Sub_EditBill
Case "zh" '增 行
Call zjlrfl
Case "sh" '删 行
Call Scdqfl
Case "bc" '保 存
If Fun_Drfrmyxxpd Then Call Sub_SaveBill
Case "fq" '放 弃
Call Sub_AbandonBill
Case "bz" '帮 助
Call F1bz
Case "fh" '退 出
Unload Me
End Select
'解 锁
Valilock = False
Changelock = False
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) '支持热键操作,更确切地讲,是工具栏热键
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -