📄 frmincomeedit.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmIncomeEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑合同收帐信息"
ClientHeight = 3855
ClientLeft = 45
ClientTop = 345
ClientWidth = 6495
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3855
ScaleWidth = 6495
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3377
MouseIcon = "FrmIncomeEdit.frx":0000
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 3240
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 1817
MouseIcon = "FrmIncomeEdit.frx":030A
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 5
Top = 3240
Width = 1300
End
Begin VB.Frame Frame1
Height = 2895
Left = 240
TabIndex = 7
Top = 120
Width = 6015
Begin VB.TextBox txtMemo
Height = 1095
Left = 1320
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 4
Top = 1680
Width = 4455
End
Begin VB.ComboBox ComboType
Height = 300
ItemData = "FrmIncomeEdit.frx":0614
Left = 1320
List = "FrmIncomeEdit.frx":061E
Style = 2 'Dropdown List
TabIndex = 1
Top = 750
Width = 1455
End
Begin VB.TextBox txtIncomeId
Height = 270
Left = 4320
MaxLength = 20
TabIndex = 0
Top = 315
Width = 1455
End
Begin VB.TextBox txtAmount
Height = 270
Left = 4320
MaxLength = 50
TabIndex = 2
Top = 765
Width = 1455
End
Begin VB.TextBox txtCashier
Height = 270
Left = 1320
MaxLength = 50
TabIndex = 3
Top = 1215
Width = 1455
End
Begin MSComCtl2.DTPicker DTDate
Height = 270
Left = 4320
TabIndex = 16
Top = 1200
Width = 1455
_ExtentX = 2566
_ExtentY = 476
_Version = 393216
Format = 24903681
CurrentDate = 38696
End
Begin VB.Label Lable16
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注"
Height = 180
Left = 240
TabIndex = 15
Top = 1680
Width = 360
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "发票类型"
Height = 180
Left = 240
TabIndex = 14
Top = 810
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "收帐金额"
Height = 180
Left = 3240
TabIndex = 13
Top = 810
Width = 720
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "发票编号"
Height = 180
Left = 3240
TabIndex = 12
Top = 360
Width = 720
End
Begin VB.Label lblContractId
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblContractId"
Height = 180
Left = 1320
TabIndex = 11
Top = 360
Width = 1170
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "合同编号"
Height = 180
Left = 240
TabIndex = 10
Top = 360
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "经办人"
Height = 180
Left = 240
TabIndex = 9
Top = 1260
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "发生日期"
Height = 180
Left = 3240
TabIndex = 8
Top = 1260
Width = 720
End
End
End
Attribute VB_Name = "FrmIncomeEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As String
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
Dim TmpId As String
If Trim(txtIncomeId) = "" Then
MsgBox "请输入发票编号号"
txtIncomeId.SetFocus
Exit Sub
End If
If Val(txtAmount) < 0 Then
MsgBox "费用应大于0"
txtAmount.SetFocus
Exit Sub
End If
If Trim(txtCashier) = "" Then
MsgBox "请输入经办人"
txtCashier.SetFocus
Exit Sub
End If
TmpId = TrimStr(txtIncomeId.Text)
'判断发票编号是否已经存在
If Modify = False Or OriId <> TmpId Then
If MyIncome.In_DB(TmpId) = True Then
MsgBox "发票编号 - " + TmpId + " - 已经存在,请重新输入"
txtIncomeId.SetFocus
Exit Sub
End If
End If
With MyIncome
.ContractId = MyContract.ContractId
.ReceiptId = MakeStr(txtIncomeId)
.ReceiptType = ComboType.Text
.Amount = Val(txtAmount)
.Cashier = MakeStr(txtCashier)
.IncomeDate = Format(DTDate.Value, "yyyy-mm-dd")
.Memo = MakeStr(txtMemo)
If Modify = False Then
.Insert
Else
Call .Update(OriId)
End If
End With
Unload Me
End Sub
Private Sub txtAmount_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtCashier_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtIncomeId_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtReceive_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -