📄 frm_part_inout.frm
字号:
Y1 = 360
Y2 = 1320
End
Begin VB.Label Label10
Caption = "用在何处"
Height = 255
Left = 1320
TabIndex = 23
Top = 2400
Width = 735
End
Begin VB.Shape Shape1
BorderColor = &H00000000&
BorderWidth = 3
FillColor = &H00FFFF00&
Height = 3375
Left = 240
Top = 360
Width = 9255
End
Begin VB.Label Label17
Caption = "备注"
Height = 255
Left = 240
TabIndex = 18
Top = 3360
Width = 735
End
Begin VB.Line Line19
BorderWidth = 2
X1 = 240
X2 = 9480
Y1 = 2280
Y2 = 2280
End
Begin VB.Label Label16
Caption = "成本(元)"
Height = 255
Left = 5760
TabIndex = 17
Top = 2400
Width = 735
End
Begin VB.Label Label15
Caption = "品牌"
Height = 255
Left = 5040
TabIndex = 16
Top = 2400
Width = 495
End
Begin VB.Label Label14
Caption = "质检人"
Height = 255
Left = 3960
TabIndex = 15
Top = 2400
Width = 615
End
Begin VB.Label Label13
Caption = "批发商"
Height = 255
Left = 840
TabIndex = 14
Top = 1440
Width = 735
End
Begin VB.Label Label12
Caption = "主张人"
Height = 255
Left = 3120
TabIndex = 13
Top = 2400
Width = 735
End
Begin VB.Label Label11
Caption = "登记人"
Height = 255
Left = 2280
TabIndex = 12
Top = 2400
Width = 615
End
Begin VB.Label Label9
Caption = "领取人"
Height = 255
Left = 480
TabIndex = 11
Top = 2400
Width = 615
End
Begin VB.Label Label8
Caption = "采购人"
Height = 255
Left = 8400
TabIndex = 10
Top = 1440
Width = 615
End
Begin VB.Line Line_Array
Index = 0
X1 = 240
X2 = 240
Y1 = 360
Y2 = 1320
End
Begin VB.Line Line10
X1 = 240
X2 = 9480
Y1 = 1800
Y2 = 1800
End
Begin VB.Line Line9
BorderWidth = 2
X1 = 240
X2 = 9480
Y1 = 1320
Y2 = 1320
End
Begin VB.Label Label7
Caption = "出库日期"
Height = 255
Left = 7320
TabIndex = 7
Top = 1440
Width = 855
End
Begin VB.Label Label6
Caption = "进库日期"
Height = 255
Left = 6360
TabIndex = 6
Top = 1440
Width = 735
End
Begin VB.Label Label5
Caption = "仓库"
Height = 255
Left = 360
TabIndex = 5
Top = 1440
Width = 375
End
Begin VB.Label Label4
Caption = "单价(元)"
Height = 255
Left = 8040
TabIndex = 4
Top = 480
Width = 855
End
Begin VB.Label Label3
Caption = "数量(个)"
Height = 255
Left = 7080
TabIndex = 3
Top = 480
Width = 735
End
Begin VB.Label Label2
Caption = "规格"
Height = 255
Index = 1
Left = 2520
TabIndex = 2
Top = 480
Width = 495
End
Begin VB.Label Label2
Caption = "名称"
Height = 255
Index = 0
Left = 1080
TabIndex = 1
Top = 480
Width = 495
End
Begin VB.Line Line1
X1 = 240
X2 = 9480
Y1 = 840
Y2 = 840
End
End
Begin VB.Label Label20
Caption = "操作人员:"
Height = 255
Left = 480
TabIndex = 39
Top = 120
Width = 855
End
Begin VB.Menu mnuPop
Caption = "将该零件合并"
Visible = 0 'False
Begin VB.Menu mnuInmerge
Caption = "将该零件合并"
End
End
End
Attribute VB_Name = "frm_Part_InOut"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mOcxArray() As Object
Dim mRSHardware As Recordset
Dim mIntField_PartSum As Integer '部件数量的字段序号
Dim mintField_PartName As Integer ''部件名称的字段序号
Dim mIntField_PartInPrice As Integer
Dim mIntField_PartSalePrice As Integer
Dim mIntField_PartId As Integer
Dim mIntField_PartInDate As Integer
Dim mIntField_PartOutDate As Integer
Dim mIntField_PartType As Integer
Dim mIntField_PartSameId As Integer
Dim mIntField_PartSaler As Integer
Dim mIntCols As Integer
Private Sub Chk_Details_Click()
If Chk_Details.Value = 1 Then
mIntCols = 18
Else
mIntCols = 6
End If
Call ShowParts(mRSHardware, Grid_Part_InOut, 0, mIntCols, KcsShowAllPart)
End Sub
Private Sub Cmd_Buy_Click()
Call PartInOut(KcsBuyPart, 0)
Cmd_S_All_Click
End Sub
Private Sub Cmd_BuySame_Click()
Call PartInOut(KcsAdd, 0)
Cmd_S_All_Click
End Sub
Private Sub Cmd_Discard_Click()
Call PartInOut(KcsDisCardPart, CLng(mOcxArray(intfield_partid).Text))
End Sub
Private Sub Cmd_Exit_Click()
Frm_Login.Txt_Name = ""
Frm_Login.Txt_PWD = ""
DBSGRG.Close
WKSGRG.Close
Unload Me
End Sub
Private Sub Cmd_Print_Click()
Dim GPrinter As FlexPrinter
Printer.ScaleMode = vbPixels
Set GPrinter = New FlexPrinter
Set GPrinter.FlexName = Grid_Part_InOut
GPrinter.CurPage = 1
GPrinter.Header = "库存清单"
GPrinter.Footer = STRGRGINFO
With GPrinter
.PosTop = 550
.PosLeft = 50
.HSpace = 0
.VSpace = 0
.RoundCorX = 10
.RoundCorY = 10
.GridPenStyle = 0
.bGridPrint = True
.bDrawBoarder = True
.BoarderColor = 0
.BoarderStyle = 0
.BoarderWidth = 1
.BoarderDistance = 5
Do
.PrintOut Printer
.CurPage = .CurPage + 1
Printer.EndDoc
Loop Until .CurPage = .TotalPages + 1
End With
End Sub
Private Sub Cmd_S_All_Click()
Dim RsSearch As Recordset
Dim pPartName As Parameter
'Set rsresearch = DBSGRG.OpenRecordset("select * from " & TblWareHouse & " where 名称 like '" & "*" & _
Txt_SearchName.Text & "*" & "'")
Set pPartName = DBSGRG.QueryDefs("用部件名称查找库存部件").Parameters![partname]
pPartName = "*"
Set RsSearch = DBSGRG.QueryDefs("用部件名称查找库存部件").OpenRecordset
If RsSearch.RecordCount = 0 Then
Call MsgBox("对不起,没找到该零配件", vbInformation + vbOKOnly, STRGARAGE)
Else
Call ShowParts(RsSearch, Grid_Part_InOut, 0, 6, KcsShowAllPart)
End If
RsSearch.Close
End Sub
Private Sub Cmd_S_Name_Click()
Dim RsSearch As Recordset
Dim pPartName As Parameter
'Set rsresearch = DBSGRG.OpenRecordset("select * from " & TblWareHouse & " where 名称 like '" & "*" & _
Txt_SearchName.Text & "*" & "'")
Set pPartName = DBSGRG.QueryDefs("用部件名称查找库存部件").Parameters![partname]
pPartName = "*" & Txt_SearchName.Text & "*"
Set RsSearch = DBSGRG.QueryDefs("用部件名称查找库存部件").OpenRecordset
If RsSearch.RecordCount = 0 Then
Call MsgBox("对不起,没找到该零配件", vbInformation + vbOKOnly, STRGARAGE)
Else
Call ShowParts(RsSearch, Grid_Part_InOut, 0, mIntCols, KcsShowAllPart)
End If
RsSearch.Close
End Sub
Private Sub Cmd_Sale_Click()
Call PartInOut(KcsSalePart, CLng(mOcxArray(mIntField_PartId).Text))
End Sub
Private Sub Cmd_ShowDedeucePart_Click()
Dim rsNeed As Recordset
Set rsNeed = DBSGRG.OpenRecordset("库存表")
Call ShowParts(rsNeed, Grid_Part_InOut, 0, mIntCols, KcsShowDeducePart)
rsNeed.Close
End Sub
Private Sub Cmd_ShowExistPart_Click()
Dim rsNeed As Recordset
Set rsNeed = DBSGRG.OpenRecordset("库存表")
Call ShowParts(rsNeed, Grid_Part_InOut, 0, mIntCols, KcsShowExistPart)
rsNeed.Close
End Sub
Private Sub Cmd_ShowNeedPart_Click()
Dim rsNeed As Recordset
Set rsNeed = DBSGRG.OpenRecordset("库存表")
Call ShowParts(rsNeed, Grid_Part_InOut, 0, mIntCols, KcsShowNeedPart)
rsNeed.Close
End Sub
Private Sub Cmd_TuiHuo_Click()
Call PartInOut(KcsBackPart, CLng(mOcxArray(intfield_partid).Text))
End Sub
Private Sub Cmd_Preview_Click()
Frm_PreView.strHeader = "库存清单"
Set Frm_PreView.MGrid = Grid_Part_InOut
Frm_PreView.Show
End Sub
Private Sub Command2_Click()
Call ShowPartById(CLng(mOcxArray(0).Text))
End Sub
Private Sub Command3_Click()
End Sub
Private Sub Form_Load()
On Error GoTo ErrHandle
Frm_Login.Caption = "进销货品登录"
Frm_Login.Txt_Name = ""
Frm_Login.Txt_PWD = ""
Frm_Login.Show vbModal
If strOkorEsc = "确定" Then
mIntCols = 6
Set WKSGRG = DBEngine.CreateWorkspace("wksKuCun", Frm_Login.Txt_Name, Frm_Login.Txt_PWD, dbUseJet)
Set DBSGRG = WKSGRG.OpenDatabase(DBPATH, False, False)
Set mRSHardware = DBSGRG.OpenRecordset("库存表", dbOpenDynaset)
If DBSGRG.Containers("tables").Documents("库存表").AllPermissions < 116 Then
MsgBox "您无操作权限", vbCritical, STRGARAGE
GoTo Fianal
End If
Txt_CangGuan.Text = Frm_Login.Txt_Name.Text
loadFields
Call ShowParts(mRSHardware, Grid_Part_InOut, 0, mIntCols, KcsShowAllPart)
StatusBar.Style = sbrSimple
StatusBar.SimpleText = "单价指出售价格,成本是购入价; ID和日期不需要填写."
Comb_way.AddItem ("现金")
Comb_way.AddItem ("记帐")
Comb_way.AddItem ("支票")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -