📄 cͩ
字号:
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":37170
Key = "tc"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3750A
Key = "bcgs"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":378A4
Key = "mrlk"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":37C3E
Key = "xsxm"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":37FD8
Key = "first"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":38372
Key = "prev"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3870C
Key = "next"
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":38AA6
Key = "last"
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":38E40
Key = "xx"
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":391DA
Key = "define"
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":39574
Key = "exec"
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3990E
Key = "xz"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":39CA8
Key = "sc"
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3A042
Key = "sx"
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3A3DC
Key = "cx"
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3A776
Key = "zd"
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3AB10
Key = "dz"
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3AEAA
Key = "ph"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3B244
Key = "fz"
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3B5DE
Key = "dw"
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3B978
Key = "hf"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3BD12
Key = "pz"
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3C0AC
Key = "check"
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3C446
Key = "zz"
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3C7E0
Key = "mx"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "c指标分析_产品毛利率分析.frx":3CB7A
Key = "lj"
EndProperty
EndProperty
End
End
Begin vsElasticLightLibCtl.vsElasticLight vsElasticLight1
Left = 7380
OleObjectBlob = "c指标分析_产品毛利率分析.frx":3CF14
Top = 45
End
End
Attribute VB_Name = "ZBFX_ProFx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim ReportTitle 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)
Dim Bln_Stop As Boolean '停止输出查询结果
Dim mySeachForm As New ProFx_Seach '定义查询窗体
Private Sub Form_Activate()
If DEBUG_FLAG = False Then On Error Resume Next
If Me.Tag = "" Then
Me.Tag = "Loaded"
'mySeachForm.Show vbModal
ProFx_Seach.Show vbModal
End If
'--------------------
'If mySeachForm.bSeach = True Then
If ProFx_Seach.bSeach = True Then
'执行查询
labDate.Caption = ProFx_Seach.Combo_BaseDate.Text
Call Sub_Query
ProFx_Seach.bSeach = False
End If
'---------------------
End Sub
Private Sub Form_Resize() '根据窗体大小来调整网格,标题栏大小
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 - 160
End Sub
Private Sub Form_Load() '窗体装入
If DEBUG_FLAG = False Then On Error Resume Next
'调入打印页面设置窗体
XtReportCode = "cwfx_Profx"
Load Dyymctbl
ReportTitle = "产品毛利率分析"
'调 入 网 格
GridCode = "cwfx_Profx"
Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
Qslz = GridInf(1)
Sjhgd = GridInf(2)
Sfxshjwg = GridInf(7)
Szzls = CxbbGrid.Cols - 1
End Sub
Private Sub Form_Unload(Cancel As Integer) '窗体卸载
'卸载条件窗体
'卸载打印页面设置窗体
Set mySeachForm = Nothing
Unload Dyymctbl
End Sub
Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) '网格格式调整
Select Case Button.Key
Case "bcgs" '保存表格格式
Call Bcwggs(CxbbGrid, GridCode)
Case "hfmrgs" '恢复默认格式
Call Hfmrgs(CxbbGrid, GridCode)
Case "szxsxm" '设置显示项目
Call Szxsxm(CxbbGrid, GridCode)
End Select
End Sub
Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "ymsz" '页面设置
Dyymctbl.Show 1
Case "yl" '预 览
Call bbyl(True)
Case "dy" '打 印
Call bbyl(False)
Case "cx" '查 询
ProFx_Seach.Show vbModal
If ProFx_Seach.bSeach = True Then
Call Sub_Query
labDate.Caption = ProFx_Seach.Combo_BaseDate.Text
ProFx_Seach.bSeach = False
End If
Case "bz" '帮 助
Call F1bz
Case "fh" '退 出
Unload Me
End Select
End Sub
Private Sub Timer1_Timer() '在窗体激活后调入查询程序
'Dim RecTemp As New ADODB.Recordset '临时使用动态集
Timer1.Enabled = False
'加入添充窗体上部“文本框”的代码
'Xt_Wait.Show
' DoEvents
' Call Sub_Query
'Unload Xt_Wait
End Sub
Private Sub Sub_Query() '生成查询结果
If DEBUG_FLAG = False Then On Error Resume Next
Dim myCls As New clsPro
Dim i As Integer
If myCls.MakeData = False Then Exit Sub '得到数据(对公共数组ProArry操作)
With CxbbGrid
'.MergeCol(0) = True
'.MergeCells = flexMergeRestrictColumns
'.CellAlignment = flexAlignRightCenter
.Rows = .FixedRows + myCls.iRecordCount + 1
For i = 0 To myCls.iRecordCount
.TextMatrix(i + .FixedRows, Sydz("001", GridStr(), Szzls)) = ProArry(i).strName
.TextMatrix(i + .FixedRows, Sydz("002", GridStr(), Szzls)) = IIf(ProArry(i).sigComeIn = 0, "", Format(ProArry(i).sigComeIn, "#,###.00"))
.TextMatrix(i + .FixedRows, Sydz("003", GridStr(), Szzls)) = IIf(ProArry(i).sigCost = 0, "", Format(ProArry(i).sigCost, "#,###.00"))
.TextMatrix(i + .FixedRows, Sydz("004", GridStr(), Szzls)) = IIf(ProArry(i).sigMaoLi = 0, "", Format(ProArry(i).sigMaoLi, "#,###,00"))
.TextMatrix(i + .FixedRows, Sydz("005", GridStr(), Szzls)) = IIf(ProArry(i).sigMaoLiLv = 0, "", Format(ProArry(i).sigMaoLiLv, ".00") & "%")
.RowHeight(i + 1) = Sjhgd
Next
End With
End Sub
Private Sub Combo_FzPxfs_Click() '网格排序方式
If DEBUG_FLAG = False Then On Error Resume Next
' If Combo_FzPxfs.ListIndex = 0 Then
' '将网格按编码排序
' With CxbbGrid
' .Col = 0
' CxbbGrid.Sort = flexSortStringAscending
' End With
' Else
' '将网格按名称排序
' With CxbbGrid
' .Col = 1
' CxbbGrid.Sort = flexSortStringAscending
' End With
' End If
End Sub
Private Sub bbyl(bbylte As Boolean) '报表打印预览
Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
Bbxbtgs = 1 '报 表 小 标 题 行 数
Bbbwhgs = 0 '报 表 表 尾 行 数
ReDim Bbxbt(1 To Bbxbtgs)
ReDim bbxbtzzxs(1 To Bbxbtgs)
If Bbbwhgs <> 0 Then
ReDim Bbbwh(1 To Bbbwhgs)
ReDim Bbbwhzzxs(1 To Bbbwhgs)
End If
Bbzbt = ReportTitle
'Bbxbt(1) = Space(2) & labDateCaption.Caption & labDate.Caption
Bbxbt(1) = Space(2) & ReportTitle & Space(30) & labDateCaption.Caption & labDate.Caption
bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
Call Scyxsjb(CxbbGrid) '生成报表数据
Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
If Not bbylte Then
Unload DY_Tybbyldy
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -