📄 frmspsend.frm
字号:
VERSION 5.00
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GACEDIT.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmSPSend
Caption = "商品发货"
ClientHeight = 3975
ClientLeft = 60
ClientTop = 345
ClientWidth = 7110
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3975
ScaleWidth = 7110
StartUpPosition = 1 '所有者中心
Begin GATLCTRLLibCtl.CalEdit CalText
Height = 465
Left = 3300
OleObjectBlob = "frmSPSend.frx":0000
TabIndex = 19
Top = 1860
Visible = 0 'False
Width = 1395
End
Begin MSFlexGridLib.MSFlexGrid GrdList
Bindings = "frmSPSend.frx":0081
Height = 1365
Left = 180
TabIndex = 18
Top = 2385
Width = 5460
_ExtentX = 9631
_ExtentY = 2408
_Version = 393216
Cols = 10
FixedCols = 0
BackColorBkg = -2147483643
GridColor = -2147483643
GridColorFixed = -2147483643
End
Begin VB.CommandButton CmdButton
Caption = "全部取消(&U)"
Height = 350
Index = 3
Left = 5760
TabIndex = 17
Top = 2880
Width = 1215
End
Begin VB.CommandButton CmdButton
Caption = "全部出库(&A)"
Height = 350
Index = 2
Left = 5760
TabIndex = 16
Top = 2385
Width = 1215
End
Begin VB.CommandButton CmdButton
Height = 350
Index = 1
Left = 5760
Style = 1 'Graphical
TabIndex = 15
Tag = "1002"
Top = 1050
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton CmdButton
Height = 350
Index = 0
Left = 5750
Style = 1 'Graphical
TabIndex = 14
Tag = "1001"
Top = 495
UseMaskColor = -1 'True
Width = 1215
End
Begin MSRDC.MSRDC DataGrid
Height = 375
Left = 5790
Top = 1740
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 661
_Version = 393216
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 1
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = -1 'True
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label lblHeadCaption
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 195
Index = 4
Left = 3060
TabIndex = 13
Top = 1170
Width = 2400
End
Begin VB.Label lblHeadCaption
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 195
Index = 3
Left = 750
TabIndex = 12
Top = 1170
Width = 1410
End
Begin VB.Label lblHeadCaption
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 195
Index = 2
Left = 4500
TabIndex = 11
Top = 675
Width = 930
End
Begin VB.Label lblHeadCaption
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 195
Index = 1
Left = 2940
TabIndex = 10
Top = 675
Width = 780
End
Begin VB.Label lblHeadCaption
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 195
Index = 0
Left = 750
TabIndex = 9
Top = 675
Width = 1410
End
Begin VB.Label lblhead
BackColor = &H80000005&
Caption = "业务员"
ForeColor = &H80000008&
Height = 195
Index = 4
Left = 2300
TabIndex = 8
Top = 1170
Width = 600
End
Begin VB.Label lblhead
BackColor = &H80000005&
Caption = "部门"
ForeColor = &H80000008&
Height = 195
Index = 3
Left = 270
TabIndex = 7
Top = 1170
Width = 375
End
Begin VB.Label lblhead
BackColor = &H80000005&
Caption = "单据号"
ForeColor = &H80000008&
Height = 195
Index = 2
Left = 3825
TabIndex = 6
Top = 675
Width = 540
End
Begin VB.Label lblhead
BackColor = &H80000005&
Caption = "日 期"
ForeColor = &H80000008&
Height = 195
Index = 1
Left = 2295
TabIndex = 5
Top = 675
Width = 555
End
Begin VB.Label lblhead
BackColor = &H80000005&
Caption = "单位"
ForeColor = &H80000008&
Height = 195
Index = 0
Left = 270
TabIndex = 4
Top = 675
Width = 375
End
Begin VB.Label lblback
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Height = 1300
Index = 0
Left = 90
TabIndex = 2
Top = 450
Width = 5500
End
Begin VB.Label lblTitle
Caption = "发出信息"
Height = 195
Index = 1
Left = 90
TabIndex = 1
Top = 1890
Width = 1005
End
Begin VB.Label lblTitle
Caption = "销售单信息"
Height = 200
Index = 0
Left = 90
TabIndex = 0
Top = 135
Width = 1005
End
Begin VB.Label lblback
BackColor = &H80000010&
Caption = "Label1"
Height = 1300
Index = 1
Left = 130
TabIndex = 3
Top = 495
Width = 5500
End
End
Attribute VB_Name = "frmSPSend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
' 标题: 商品发出
' 作者: 蒲苇
' 日期: 98-07-15
'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Option Explicit
Private Const LOrRSpace = 50 '距窗体左右边距
Private Const IntSpace = 75 '距窗体上下边距,框与框上下左右距离
Private Const BackSpace = 50 '
Private Const PartSpace = 50 '各控件数组水平间距
Private Const HeadS = 300 '各控件数组上下间距
Private Const intFormHeight = 5000 '窗体最小高度
Private Const intFormWidth = 9000 '窗体最小宽度
Private Const intFixCols = 8
Private Const intViewID = 144
Dim intID As Long '业务ID
Private WithEvents MesGrid As Grid
Attribute MesGrid.VB_VarHelpID = -1
Dim OldRow As Integer '原来行
Dim OldCol As Integer '原来列
Dim intT1 As Integer '应收数量列
Dim intT2 As Integer '已收数量列
Dim intT3 As Integer '本次数量列
Dim blnIsSave As Boolean '判断是否能够存盘
'从对应视图取SQL语句,取出记录给列表
Private Sub GridList()
Dim strSql As String
Dim SelectSQL As String, FromSQl As String, WhereSQL As String
Dim strWH As String
Dim RecGrid As rdoResultset
MesGrid.ListSet.ViewId = intViewID
With grdList
.Redraw = False
.FixedCols = 0
End With
With MesGrid.ListSet
FromSQl = .FromOfSql
SelectSQL = .SelectOfSql
WhereSQL = .WhereOfSql
End With
strWH = " WHERE ((ItemNature.strItemCategory)='1') AND ((ItemActivity.lngActivityID) =" & intID & ")"
If Trim(WhereSQL) <> "" Then strWH = strWH & "AND" & WhereSQL
strSql = "SELECT ItemActivityDetail.lngActivityDetailID 业务明细ID,' ' 选择, " _
& "ItemUnit.lngUnitID 计量单位ID, ItemUnit.dblFactor 转换因子, " _
& "Item.lngMinUnitID 最小计量单位ID,ItemActivityDetail.dblQuantity, " _
& "ItemActivityDetail.dblPositionQuantity,0 本次数量, "
strSql = strSql & SelectSQL & " " & FromSQl & strWH
Set RecGrid = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
Set DataGrid.Resultset = RecGrid
RecGrid.Close
With grdList
.FixedCols = intFixCols
.SelectionMode = flexSelectionFree
.FocusRect = flexFocusNone
.ColWidth(0) = 0 '业务明细ID
.ColWidth(1) = 500
.ColWidth(2) = 0 '计量单位ID
.ColWidth(3) = 0 '转换因子
.ColWidth(4) = 0 '最小计量单位ID
.ColWidth(5) = 0 '应出入库数量
.ColWidth(6) = 0 '出入库数量
.ColWidth(7) = 0 '本次出入库数量
.Redraw = True
End With
End Sub
'在GRID列中显示转换后的数量值
Private Sub IntiShowGrid()
Dim i As Integer, j As Integer, k As Integer
Dim NumI As String, NumJ As String, NumK As String
Dim NumbI As String, NumbJ As String, NumbK As String
i = intFixCols
j = intFixCols
k = intFixCols
Do While Not ((grdList.TextMatrix(0, i) Like "应出数量*"))
i = i + 1
If i >= grdList.Cols Then i = grdList.Cols - 1: Exit Do
Loop
Do While Not ((grdList.TextMatrix(0, j) Like "已出数量*"))
j = j + 1
If j >= grdList.Cols Then j = grdList.Cols - 1: Exit Do
Loop
Do While (grdList.TextMatrix(0, k) <> "本次出库数量")
k = k + 1
If k >= grdList.Cols Then k = grdList.Cols - 1: Exit Do
Loop
intT1 = i
intT2 = j
intT3 = k
Dim NowRow As Integer
NowRow = 1
While NowRow < grdList.Rows
NumI = grdList.TextMatrix(NowRow, 5)
NumJ = grdList.TextMatrix(NowRow, 6)
NumK = grdList.TextMatrix(NowRow, 7)
NumbI = NumberConvert(NumI, grdList.TextMatrix(NowRow, 3), False)
NumbJ = NumberConvert(NumJ, grdList.TextMatrix(NowRow, 3), False)
NumbK = NumberConvert(NumK, grdList.TextMatrix(NowRow, 3), False)
grdList.TextMatrix(NowRow, i) = DisplayData(Me.hwnd, NumbI, grdList.TextMatrix(NowRow, 3))
grdList.TextMatrix(NowRow, j) = DisplayData(Me.hwnd, NumbJ, grdList.TextMatrix(NowRow, 3))
grdList.TextMatrix(NowRow, k) = DisplayData(Me.hwnd, NumbK, grdList.TextMatrix(NowRow, 3))
grdList.TextMatrix(NowRow, 1) = "√"
NowRow = NowRow + 1
Wend
CmdButRK_Click
End Sub
'窗体初始化
Public Sub IntiForm()
lblTitle(0).Left = LOrRSpace
lblTitle(0).top = IntSpace
LblBack(0).Left = LOrRSpace
LblBack(0).top = lblTitle(0).top + lblTitle(0).Height + IntSpace
LblBack(1).Left = LblBack(0).Left + BackSpace
LblBack(1).top = LblBack(0).top + BackSpace
lblHead(0).Left = LblBack(0).Left + 135
lblHead(0).top = LblBack(0).top + HeadS
lblHead(1).top = lblHead(0).top
lblHead(2).top = lblHead(0).top
lblHead(3).Left = lblHead(0).Left
lblHead(3).top = lblHead(0).top + lblHead(0).Height + HeadS
lblHead(4).top = lblHead(3).top
Dim i As Integer
For i = 0 To lblHead.Count - 1
lblHeadCaption(i).top = lblHead(i).top
Next i
cmdButton(0).top = LblBack(0).top
cmdButton(1).top = cmdButton(0).top + cmdButton(0).Height + IntSpace
lblTitle(1).top = LblBack(1).top + LblBack(1).Height + IntSpace
lblTitle(1).Left = LOrRSpace
grdList.Left = LOrRSpace
grdList.top = lblTitle(1).top + lblTitle(1).Height + IntSpace
cmdButton(2).top = grdList.top
cmdButton(3).top = cmdButton(2).top + cmdButton(2).Height + IntSpace
End Sub
'窗体尺寸大小改变
Public Sub RedrawForm()
Dim lRate As Integer
On Error GoTo EndProc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -