📄 银行取款.frm
字号:
Private Sub Combo1_GotFocus()
On Error GoTo reqer2
Combo1.clear
If rsTckd Is Nothing Then
''''reqer2: Set rsTckd = dbsZJ.OpenRecordset("Select * from FD_fetch where cFetID like '" & IIf(djnwb = 1, "02", "04") & "*' and isnull(CbookCode) order by cFetID", dbOpenDynaset)
reqer2: Set rsTckd = oV.getUnBookRst
Else
rsTckd.Requery
End If
With rsTckd
If .EOF Then
Textqk
ckdbutt
Exit Sub
Else
.MoveLast
.MoveFirst
End If
Do While Not .EOF
Combo1.AddItem right(![cFetID], 10)
.MoveNext
Loop
If Editbh.Text <> "" Then
FindFirst rsTckd, "cFetid >= '" & IIf(djnwb = 1, "02", "04") & Editbh.Text & "'"
If .EOF Then
.MoveLast
End If
Carddata
ckdbutt
End If
End With
End Sub
Private Sub Editje_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 45 And Index = 1 Then
KeyAscii = 0
End If
End Sub
' 银行账户参照
Private Sub Refyhmc_Initialize()
Refyhmc.InitSys 0, dbsZJ
Refyhmc.InitSys 1, Edityhmc.Text
End Sub
Private Sub Refyhmc_RefCancel()
Edityhmc.SetFocus
End Sub
Private Sub Refyhmc_RefOK(Code As String)
Edityhmc.Text = Code
Edityhmc.SetFocus
End Sub
Private Sub Refyhzh_Initialize()
Refyhzh.InitSys 0, dbsZJ
Refyhzh.InitSys 1, Edityhzh.Text
Refyhzh.InitSys 2, Edityhmc.Text
End Sub
Private Sub Refyhzh_RefCancel()
Edityhzh.SetFocus
End Sub
Private Sub Refyhzh_RefOK(Code As String)
Edityhzh.Text = Code
Edityhzh.SetFocus
End Sub
' 业务编号按键
Private Sub Editbh_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
SendKeys "{Tab}"
End If
End Sub
Private Sub Editbh_LostFocus()
If IsNew Then
If Len(Editbh.Text) > 0 Then
Editbh.Text = right("00000000" & Editbh.Text, 10)
End If
End If
End Sub
' 业务日期按键
Private Sub Editrq_Keyup(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And isEnt(0) Then
SendKeys "{Tab}"
End If
If Not isFh And KeyCode = 113 Then 'F2
View_Calendar Me, Editrq, Picture1.top
End If
isEnt(0) = True
End Sub
Private Sub Editrq_Change()
Tbr_Change
isEnt(0) = True
End Sub
Private Sub Editrq_LostFocus()
If Not isSave And Editrq.Text <> "" And isEnt(0) Then
Editrq.Text = ForDate(Editrq.Text)
If IsDate(Editrq.Text) Then
Editrq.Text = Format(Editrq.Text, "yyyy-mm-dd")
Else
Beep
MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
SetTxtFocus Editrq
isEnt(0) = False
End If
End If
End Sub
'银行名称按键
Private Sub Edityhmc_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And isEnt(1) Then
SendKeys "{Tab}"
End If
If Not isFh And KeyCode = 113 Then 'F2
Refyhmc.RunReference
End If
isEnt(1) = True
End Sub
Private Sub Edityhmc_LostFocus()
If Not isSave And isEnt(1) And Edityhmc.Text <> "" Then
If Yhmc_err(Edityhmc, Edityhzh, djnwb, IIf(Option1(0).Value, 0, 1)) Then
SetTxtFocus Edityhmc
isEnt(1) = False
End If
End If
End Sub
Private Sub Edityhmc_Change()
Tbr_Change
isEnt(1) = True
End Sub
Private Sub Edityhmc_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Edityhmc.ToolTipText = Edityhmc.Text
End Sub
' 银行账号按键
Private Sub Edityhzh_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And isEnt(2) Then
SendKeys "{Tab}"
End If
If Not isFh And KeyCode = 113 Then 'F2
Refyhzh.RunReference
End If
isEnt(2) = True
End Sub
Private Sub Edityhzh_LostFocus()
If Not isSave And isEnt(2) And Edityhzh.Text <> "" Then
If Qkzh_err(Me, False, djnwb, IIf(Option1(0).Value, 0, 1), IsNew) Then
SetTxtFocus Edityhzh
isEnt(2) = False
End If
End If
End Sub
Private Sub Edityhzh_Change()
Tbr_Change
isEnt(2) = True
End Sub
' 计算汇率小数位
Private Sub Textbb_Change()
Editje(1).NumPoint = Gethldec(Textbb.Text)
Editje(1).Locked = IIf(Textbb.Text = ZjAccInfo.zjStandExch, True, False)
If Not Frtin And Textbb.Text <> "" Then
Editje(1).Text = GetCurHl(Textbb.Text, Editrq.Text)
End If
End Sub
' 汇率按键
Private Sub Editje_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
SendKeys "{Tab}"
End If
End Sub
Private Sub Editje_Change(Index As Integer)
If Not Frtin Then
If IsNumeric(Editje(1).Text) And IsNumeric(Editje(0).Text) Then
Textje.Text = Format(CDbl(Editje(0).Text) * CDbl(Editje(1).Text), "#0.00")
Else
Textje.Text = ""
End If
End If
Tbr_Change
End Sub
' 经办人按键
Private Sub Editjbr_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
SendKeys "{Tab}"
End If
End Sub
Private Sub Editjbr_Change()
Tbr_Change
End Sub
' 摘要按键
Private Sub Editzy_Change()
Tbr_Change
End Sub
Private Sub Editzy_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Editzy.ToolTipText = Editzy.Text
End Sub
' 定期、活期设置
Private Sub Option1_Click(Index As Integer)
Tbr_Change
Editmonth.Enabled = Option1(0).Value
Editje(0).Locked = Option1(0).Value
If LoadFlag Then '窗体已经加载
'Cuidong 2000/06/21 抄自 Edityhzh_LostFocus
If Qkzh_err(Me, False, djnwb, IIf(Option1(0).Value, 0, 1), IsNew) Then 'Cuidong 2000/06/21
SetTxtFocus Edityhzh 'Cuidong 2000/06/21
isEnt(2) = False 'Cuidong 2000/06/21
End If 'Cuidong 2000/06/21
End If
End Sub
' 窗体初始
Private Sub Form_Load()
LoadFlag = False '窗体未加载 'Cuidong
Screen.MousePointer = vbHourglass
CenterForm Me
Me.Caption = IIf(djnwb = 1, "银行取款单", "内部取款单")
Refyhmc.RefUnitMode = IIf(djnwb = 1, RefBank, RefNotBank)
Refyhzh.RefAccMode = IIf(djnwb = 1, RefOutsideAcc, RefInsideAcc)
Checkqx = Informtlb(Tlbckd, ImageList1, True, 2)
InckForm Me, djnwb, 0 ' 窗体标题中、英文设置
Label2.Caption = Ywbhtoname(IIf(djnwb = 1, "02", "04")) '业务编号赋值
'''' Set rsTckd = dbsZJ.OpenRecordset("Select * from FD_fetch where cFetID like '" & IIf(djnwb = 1, "02", "04") & "*' and isnull(CbookCode) order by cFetID", dbOpenDynaset)
Set rsTckd = oV.getUnBookRst
If Not rsTckd.EOF Then
rsTckd.MoveLast
rsTckd.MoveFirst
End If
Carddata
ckdbutt
isEnt(0) = True
isEnt(1) = True
isEnt(2) = True
Combo1_GotFocus
Screen.MousePointer = vbDefault
LoadFlag = True '窗体已经加载 'Cuidong
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
If Not isSave Then
Select Case PromptSav
Case vbYes:
If Ckdquit() Then
CkdSave
If isSave Then
rsTckd.Close
Else
Cancel = True
End If
Else
Cancel = True
End If
Case vbNo:
rsTckd.Close
Case vbCancel
Cancel = True
End Select
Else
rsTckd.Close
End If
End Sub
'工具栏
Private Sub tlbckd_ButtonClick(ByVal Button As ComctlLib.Button)
Gen_Key Button.key
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF3
If Shift = 0 And Tlbckd.Buttons("Check").Enabled Then
Gen_Key "Check"
End If
Case vbKeyF4
If Shift = 4 Then
Gen_Key "Exit"
ElseIf Shift = 0 And Tlbckd.Buttons("CheckCancel").Enabled Then
Gen_Key "CheckCancel"
End If
Case vbKeyF5
If Shift = 0 And Tlbckd.Buttons("AddRecord").Enabled Then
Gen_Key "AddRecord"
End If
Case vbKeyF6
If Shift = 0 And Tlbckd.Buttons("SaveRecord").Enabled Then
Gen_Key "SaveRecord"
End If
Case vbKeyF7
If Shift = 4 And Tlbckd.Buttons("PingZheng").Enabled Then
Gen_Key "PingZheng"
End If
Case vbKeyC
If Shift = 2 And Tlbckd.Buttons("CopyRecord").Enabled And Tlbckd.Buttons("CopyRecord").ToolTipText = "Ctrl+C" Then
Gen_Key "CopyRecord"
KeyCode = 0
End If
Case vbKeyV
If Shift = 2 And Tlbckd.Buttons("CopyRecord").Enabled And Tlbckd.Buttons("CopyRecord").ToolTipText = "Ctrl+V" Then
Gen_Key "CopyRecord"
KeyCode = 0
End If
Case vbKeyY
If Shift = 2 And Tlbckd.Buttons("DeleteRecord").Enabled And Tlbckd.Buttons("DeleteRecord").ToolTipText = "Ctrl+Y" Then
Gen_Key "DeleteRecord"
KeyCode = 0
End If
Case vbKeyR
If Shift = 2 And Tlbckd.Buttons("DeleteRecord").Enabled And Tlbckd.Buttons("DeleteRecord").ToolTipText = "Ctrl+R" Then
Gen_Key "DeleteRecord"
KeyCode = 0
End If
Case vbKeyP
If Shift = 2 And Tlbckd.Buttons("Print").Enabled Then
Gen_Key "Print"
KeyCode = 0
End If
Case vbKeyS
'cuidong 2001.01.15
'If Shift = 2 And Tlbckd.Buttons("Preview").Enabled Then
' Gen_Key "Preview"
' KeyCode = 0
'End If
Case vbKeyW
If Shift = 2 And Tlbckd.Buttons("Dataout").Enabled Then
Gen_Key "Dataout"
KeyCode = 0
End If
Case vbKeyPageUp
If Shift = 0 And Tlbckd.Buttons("PriorPage").Enabled Then
Gen_Key "PriorPage"
ElseIf Shift = 2 And Tlbckd.Buttons("FirstPage").Enabled Then
Gen_Key "FirstPage"
End If
Case vbKeyPageDown
If Shift = 0 And Tlbckd.Buttons("NextPage").Enabled Then
Gen_Key "NextPage"
ElseIf Shift = 2 And Tlbckd.Buttons("LastPage").Enabled Then
Gen_Key "LastPage"
End If
End Select
End Sub
Private Sub Gen_Key(TLB_Key As String)
On Error Resume Next
Select Case TLB_Key
Case Is = "Print", "Preview", "Dataout"
zjPrnViewOut Me, "yhckdj", TLB_Key, djnwb, 0
Case Is = "AddRecord" '增加
Dim xf As Boolean
xf = True
If Not isSave Then
Select Case PromptSav
Case vbYes:
If Ckdquit() Then
CkdSave
xf = isSave
Else
xf = False
End If
Case vbNo:
Case vbCancel:
xf = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -