📄 frmquerysaleseniority.frm
字号:
EndProperty
BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_NumberOfBands = 1
_Band(0).Cols = 13
_Band(0).GridLinesBand= 1
_Band(0).TextStyleBand= 0
_Band(0).TextStyleHeader= 0
End
Begin VB.Label lblStartDate
BackStyle = 0 'Transparent
Caption = "起始日期:"
Height = 180
Left = 8880
TabIndex = 22
Top = 360
Width = 2200
End
Begin VB.Label lblEndDate
BackStyle = 0 'Transparent
Caption = "终止日期:"
Height = 180
Left = 8880
TabIndex = 21
Top = 600
Width = 2205
End
Begin VB.Image imgTitle
Height = 1350
Left = 360
Picture = "frmQuerySaleSeniority.frx":3328
Top = -120
Width = 1800
End
Begin VB.Label lblTitle
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "易通咨讯科技"
ForeColor = &H00FF0000&
Height = 180
Left = 5685
TabIndex = 20
Top = 240
Width = 1080
End
Begin VB.Label lblTitleHead
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "时段营业报表"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5415
TabIndex = 19
Top = 480
Width = 1545
End
Begin VB.Label lblStyle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "当前SQL语句"
Height = 180
Left = 5640
TabIndex = 18
Top = 840
Visible = 0 'False
Width = 990
End
End
Begin MSComctlLib.ImageList ImageList2
Left = 4320
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 28
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":76E0
Key = "sz"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":7A7A
Key = "dy"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":7E14
Key = "yl"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":81AE
Key = "xz"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":8548
Key = "xg"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":88E2
Key = "sc"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":8C7C
Key = "zh"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":9016
Key = "sh"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":93B0
Key = "bc"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":974A
Key = "fq"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":9AE4
Key = "check"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":9E7E
Key = "qs"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":A218
Key = "fullcheck"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":A5B2
Key = "qq"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":A94C
Key = "first"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":ACE6
Key = "prev"
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":B080
Key = "next"
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":B41A
Key = "last"
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":B7B4
Key = "bz"
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":BB4E
Key = "sx"
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":BEE8
Key = "tc"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":C282
Key = "bcgs"
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":C61C
Key = "mrlk"
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":C9B6
Key = "xsxm"
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":CD50
Key = "cx"
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":D0EA
Key = "dj"
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":D484
Key = "gb"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmQuerySaleSeniority.frx":D81E
Key = "dk"
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmQuerySaleSeniority"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAddBill_Click()
frmQueryDateSRI.Show 1
End Sub
Private Sub cmdEdit_Click()
frmQueryNameSRI.Show 1
End Sub
Private Sub cmdGoods_Click()
frmQueryGoodsSRI.Show 1
End Sub
Private Sub cmdPrint_Click()
Dim rptRs As New ADODB.Recordset
With rptTotal
'sSQL = "select * from Bill where bBillNo='" & frmInStore.mshfView.TextMatrix(frmInStore.mshfView.RowSel, 1) & "'"
sSQL = "SELECT Total.gCode, Goods.gBarCode, Goods.gGAddress, (Goods.gName + ' ' + Goods.gModel) as gName, Goods.gUnits,Total.gStockAddress as gStockAddress, Sum(val(Total.gStockTotal)) AS gStockTotal, Total.gEditDate,Total.gRemark"
sSQL = sSQL & " from Total, Goods"
sSQL = sSQL & " where Total.gCode = Goods.gCode and Goods.gGAddress<>''" 'order by gcCode asc"
sSQL = sSQL & "GROUP BY Total.gCode, Goods.gBarCode, Goods.gGAddress, Goods.gName, Goods.gModel, Goods.gUnits,Total.gStockAddress, Total.gEditDate, Total.gRemark"
sSQL = sSQL & " order by Goods.gGAddress asc"
If rptRs.State <> 0 Then rptRs.Close
rptRs.Open sSQL, Conn, adOpenDynamic, adLockReadOnly
Set .DataSource = rptRs
.Sections("rptBody").Controls("txtXuHao").DataField = "gGAddress"
.Sections("rptBody").Controls("txtbGoodsCode").DataField = "gCode"
.Sections("rptBody").Controls("txtbGoodsBar").DataField = "gBarCode"
.Sections("rptBody").Controls("txtbGoodsName").DataField = "gName"
.Sections("rptBody").Controls("txtbGoodsUnits").DataField = "gUnits"
' .Sections("rptBody").Controls("txtbGoodsNumber").DataField = "gUnits"
'.Sections("rptBody").Controls("txtbGoodsPrice").DataField = "gStockAddress"
.Sections("rptBody").Controls("txtbGoodsMoney").DataField = "gEditDate"
.Sections("rptBody").Controls("txtbGoodsRemark").DataField = "gRemark"
' .Sections("rptFoot").Controls("lblNum").Caption = Me.txtTotalNumber
End With
'rptInStore.Show
rptTotal.Show
End Sub
Private Sub cmdReflesh_Click()
sSQL = "SELECT Bill.bBillNo, Bill.bDate, (Supplier.sCode + ' '+ Supplier.sName) as bDeptFrom, Bill.bToShould, BillSub.bGoodsCode, BillSub.bGoodsBar, BillSub.bGoodsName, BillSub.bGoodsUnits, BillSub.bGoodsPrice, BillSub.bGoodsNumber, BillSub.bGoodsMoney, Bill.bRemark"
sSQL = sSQL & " FROM (Bill INNER JOIN Supplier ON Bill.bDeptFrom = Supplier.sCode) INNER JOIN BillSub ON Bill.bBillNo = BillSub.bBillNo"
sSQL = sSQL & " where Bill.bDate>='" & Right(Trim(Me.lblStartDate), 10) & "'"
sSQL = sSQL & " and Bill.bDate<='" & Right(Trim(Me.lblEndDate), 10) & "'"
sSQL = sSQL & " and Bill.bStyle='入库'"
sSQL = sSQL & " and BillSub.bGoodsCode<>''"
sSQL = sSQL & " order by Bill.bDate desc"
Me.lblTotal = ShowData(sSQL, Me.mshfView, 30)
Call GetBillTotal(mshfView, lblNumber, lblMoney) '统计当前数量和金额
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2 + 80
Call Setcaption(mshfView, "序号;事务编号;事务日期;供应商名称;对应单号;物资编码;条形码;商品名称/规格;单位;单价;数量;金额;备注;")
With mshfView
.ColWidth(0) = 255 * 2
.ColWidth(1) = 255 * 5
.ColWidth(2) = 255 * 4.5
.ColWidth(3) = 255 * 10
.ColWidth(4) = 255 * 4
.ColWidth(5) = 255 * 4
.ColWidth(6) = 255 * 6
.ColWidth(7) = 255 * 10
.ColWidth(8) = 255 * 3
.ColWidth(9) = 255 * 5
.ColWidth(10) = 255 * 4
.ColWidth(11) = 255 * 5
.ColWidth(12) = 255 * 10
.ColAlignment(3) = 1
.ColAlignment(4) = 1
.ColAlignment(7) = 1
.ColAlignment(9) = 7
.ColAlignment(11) = 7
End With
Me.lblStartDate = "起始日期:" & Format(Date, "yyyy-MM-dd")
Me.lblEndDate = "终止日期:" & Format(Date, "yyyy-MM-dd")
'显示软件使用者名称
Me.lblTitle = gCompanyName
sSQL = "SELECT Bill.bBillNo, Bill.bDate, (Supplier.sCode + ' '+ Supplier.sName) as bDeptFrom, Bill.bToShould, BillSub.bGoodsCode, BillSub.bGoodsBar, BillSub.bGoodsName, BillSub.bGoodsUnits, BillSub.bGoodsPrice, BillSub.bGoodsNumber, BillSub.bGoodsMoney, Bill.bRemark"
sSQL = sSQL & " FROM (Bill INNER JOIN Supplier ON Bill.bDeptFrom = Supplier.sCode) INNER JOIN BillSub ON Bill.bBillNo = BillSub.bBillNo"
sSQL = sSQL & " where Bill.bDate>='" & Right(Trim(Me.lblStartDate), 10) & "'"
sSQL = sSQL & " and Bill.bDate<='" & Right(Trim(Me.lblEndDate), 10) & "'"
sSQL = sSQL & " and Bill.bStyle='入库'"
sSQL = sSQL & " and BillSub.bGoodsCode<>''"
sSQL = sSQL & " order by Bill.bDate desc"
Me.lblTotal = ShowData(sSQL, Me.mshfView, 30)
Call GetBillTotal(mshfView, lblNumber, lblMoney) '统计当前数量和金额
End Sub
Private Sub Form_Resize()
If Me.WindowState <> 1 Then
Me.picLeft.Height = Me.Height - Me.picLeft.Top - 500
Me.sstBody.Width = Me.Width - Me.sstBody.Left - 250
Me.sstBody.Height = Me.Height - 600
Me.picTable.Width = Me.sstBody.Width - 300
Me.picTable.Height = Me.sstBody.Height - 650
'Me.picTable2.Width = Me.sstBody.Width - 300
'Me.picTable2.Height = Me.sstBody.Height - 650
Me.mshfView.Width = Me.picTable.Width - 800
Me.mshfView.Height = Me.picTable.Height - 1900
Me.picButtom2.Top = Me.mshfView.Height + Me.mshfView.Top + 100
Me.lblStartDate.Left = Me.mshfView.Left + Me.mshfView.Width - Me.lblStartDate.Width + 200
Me.lblEndDate.Left = Me.mshfView.Left + Me.mshfView.Width - Me.lblEndDate.Width + 200
'标题位置
Me.lblTitle.Left = (Me.picTable.Width - Me.lblTitle.Width) / 2
Me.lblTitleHead.Left = (Me.picTable.Width - Me.lblTitleHead.Width) / 2
End If
End Sub
Private Sub mshfView_GotFocus()
Oldwinproc = GetWindowLong(Me.hWnd, GWL_WNDPROC)
SetWindowLong Me.hWnd, GWL_WNDPROC, AddressOf FlexScroll
End Sub
'将下列代码写到表格控件的LostFocus事件中
Private Sub mshfView_LostFocus()
SetWindowLong Me.hWnd, GWL_WNDPROC, Oldwinproc
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -