📄 ht_hyxy.frm
字号:
T_TJ = T_TJ & "CSTR(YXQ)='" & CDate(Trim(m_yxq1)) & "'"
Else
T_TJ = T_TJ & " AND CSTR(YXQ)='" & CDate(Trim(m_yxq1)) & "'"
End If
End If
If m_qzrq1.Text <> " - - " Then
t_rq = date_cl(m_qzrq1.Text)
If t_rq <> "F" Then
m_qzrq1 = t_rq
End If
If IsDate(m_qzrq1.Text) Then
If T_TJ = "" Then
T_TJ = T_TJ & "CSTR(QZRQ)='" & CDate(m_qzrq1) & "'"
Else
T_TJ = T_TJ & " AND CSTR(QZRQ)='" & CDate(m_qzrq1) & "'"
End If
Else
m_qzrq1.SetFocus
m_qzrq1.SelStart = 0
m_qzrq1.SelLength = Len(m_qzrq1.Text)
End If
End If
If Not T_TJ = "" Then
Set t_rec = YX_data.OpenRecordset("select HTDM,JFDB,YFDW,LXDH,ZGYH,QJHY,FJYH1,FJYH1HY,FJYH2,FJYH2HY,YXQ,QZRQ,LOCK_NO from YX_HYXY WHERE " & T_TJ, 4)
If Not t_rec.BOF Then
t_rec.MoveLast
End If
Call pub_memo.Flex_full(FLEX1, t_bt, t_rec, t_fields, 11, Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
rec_no.Caption = "当前记录数:" + CStr(FLEX1.Rows - 1)
Call first
Else
Set t_rec = YX_data.OpenRecordset("select HTDM,JFDB,YFDW,LXDH,ZGYH,QJHY,FJYH1,FJYH1HY,FJYH2,FJYH2HY,YXQ,QZRQ,LOCK_NO from YX_HYXY", 4)
If Not t_rec.BOF Then
t_rec.MoveLast
End If
Call pub_memo.Flex_full(FLEX1, t_bt, t_rec, t_fields, 11, Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
rec_no.Caption = "当前记录数:" + CStr(FLEX1.Rows - 1)
Call first
End If
End If
End Sub
Private Sub m_lxdh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_zgyh.SetFocus
End If
End Sub
Private Sub m_qjhy_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_qjhy_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_qjhy_LostFocus
End If
End Sub
Private Sub m_qjhy_LostFocus()
If Frame2.Enabled = True Then
If Not m_qjhy.Text = "" Then
If Not IsNumeric(Trim(m_qjhy.Text)) Then
frm_msg.Caption = "无效全价回佣!"
m_qjhy.SetFocus
m_qjhy.SelStart = 0
m_qjhy.SelLength = Len(Trim(m_qjhy.Text))
Else
m_yh1.SetFocus
m_yh1.SelStart = 0
m_yh1.SelLength = Len(Trim(m_yh1.Text))
End If
Else
m_qjhy = "0"
m_yh1.SetFocus
m_yh1.SelStart = 0
m_yh1.SelLength = Len(Trim(m_yh1.Text))
End If
End If
End Sub
Private Sub m_qzrq_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_qzrq_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_qzrq_LostFocus
End If
End Sub
Private Sub m_qzrq_LostFocus()
If Frame2.Enabled = True Then
If Not m_qzrq.Text = " - - " Then
t_rq = date_cl(Trim(m_qzrq.Text))
If t_rq <> "F" Then
m_qzrq = t_rq
End If
If IsDate(Trim(m_qzrq.Text)) Then
If CDate(Trim(m_qzrq.Text)) >= Date Then
m_yxq.SetFocus
Else
frm_msg.Caption = "无效日期!"
m_qzrq.SetFocus
m_qzrq.SelStart = 0
m_qzrq.SelLength = Len(m_qzrq.Text)
Exit Sub
End If
Else
frm_msg.Caption = "无效日期!"
m_qzrq.SetFocus
m_qzrq.SelStart = 0
m_qzrq.SelLength = Len(m_qzrq.Text)
Exit Sub
End If
Else
frm_msg.Caption = "无效日期!"
m_qzrq.SetFocus
m_qzrq.SelStart = 0
m_qzrq.SelLength = Len(m_qzrq.Text)
End If
End If
End Sub
Private Sub m_yfdw_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yfdw_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yfdw_LostFocus
End If
End Sub
Private Sub m_yfdw_LostFocus()
If Frame2.Enabled = True Then
If Not m_yfdw.Text = "" Then
m_lxdh.SetFocus
Else
frm_msg.Caption = "请输入乙方单位!"
m_yfdw.SetFocus
m_yfdw.SelStart = 0
m_yfdw.SelLength = Len(Trim(m_yfdw.Text))
End If
End If
End Sub
Private Sub m_yh1_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yh1_hy_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yh1_hy_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yh1_hy_LostFocus
End If
End Sub
Private Sub m_yh1_hy_LostFocus()
If Frame2.Enabled = True Then
If Not m_yh1_hy.Text = "" Then
If Not IsNumeric(Trim(m_yh1_hy.Text)) Then
frm_msg.Caption = "无效优惠1回佣!"
m_yh1_hy.SetFocus
m_yh1_hy.SelStart = 0
m_yh1_hy.SelLength = Len(Trim(m_yh1_hy.Text))
Else
m_yh2.SetFocus
m_yh2.SelStart = 0
m_yh2.SelLength = Len(Trim(m_yh2.Text))
End If
Else
m_yh1_hy = "0"
m_yh2.SetFocus
m_yh2.SelStart = 0
m_yh2.SelLength = Len(Trim(m_yh2.Text))
End If
End If
End Sub
Private Sub m_yh1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yh1_LostFocus
End If
End Sub
Private Sub m_yh1_LostFocus()
If Frame2.Enabled = True Then
If Not m_yh1.Text = "" Then
If Not IsNumeric(Trim(m_yh1.Text)) Then
frm_msg.Caption = "无效优惠1!"
m_yh1.SetFocus
m_yh1.SelStart = 0
m_yh1.SelLength = Len(Trim(m_yh1.Text))
Else
m_yh1_hy.SetFocus
m_yh1_hy.SelStart = 0
m_yh1_hy.SelLength = Len(Trim(m_yh1_hy.Text))
End If
Else
m_yh1 = "0"
m_yh1_hy.SetFocus
m_yh1_hy.SelStart = 0
m_yh1_hy.SelLength = Len(Trim(m_yh1_hy.Text))
End If
End If
End Sub
Private Sub m_yh2_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yh2_hy_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yh2_hy_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yh2_hy_LostFocus
End If
End Sub
Private Sub m_yh2_hy_LostFocus()
If Frame2.Enabled = True Then
If Not m_yh2_hy.Text = "" Then
If Not IsNumeric(Trim(m_yh2_hy.Text)) Then
frm_msg.Caption = "无效优惠2回佣!"
m_yh2_hy.SetFocus
m_yh2_hy.SelStart = 0
m_yh2_hy.SelLength = Len(Trim(m_yh2_hy.Text))
Else
m_qzrq.SetFocus
m_qzrq.SelStart = 0
m_qzrq.SelLength = Len(m_yxq.Text)
End If
Else
m_yh2_hy = "0"
m_qzrq.SetFocus
m_qzrq.SelStart = 0
m_qzrq.SelLength = Len(m_yxq.Text)
End If
End If
End Sub
Private Sub m_yh2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yh2_LostFocus
End If
End Sub
Private Sub m_yh2_LostFocus()
If Frame2.Enabled = True Then
If Not m_yh2.Text = "" Then
If Not IsNumeric(Trim(m_yh2.Text)) Then
frm_msg.Caption = "无效最高优惠2!"
m_yh2.SetFocus
m_yh2.SelStart = 0
m_yh2.SelLength = Len(Trim(m_yh2.Text))
Else
m_yh2_hy.SetFocus
m_yh2_hy.SelStart = 0
m_yh2_hy.SelLength = Len(Trim(m_yh2_hy.Text))
End If
Else
m_yh2 = "0"
m_yh2_hy.SetFocus
m_yh2_hy.SelStart = 0
m_yh2_hy.SelLength = Len(Trim(m_yh2_hy.Text))
End If
End If
End Sub
Private Sub m_yxq_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_yxq_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_yxq_LostFocus
End If
End Sub
Private Sub m_yxq_LostFocus()
If Frame2.Enabled = True Then
If Not m_yxq.Text = "" Then
t_rq = date_cl(Trim(m_yxq.Text))
If t_rq <> "F" Then
m_yxq = t_rq
End If
If IsDate(Trim(m_yxq.Text)) Then
If CDate(Trim(m_yxq.Text)) >= CDate(Trim(m_qzrq.Text)) Then
cmd1(0).SetFocus
Else
frm_msg.Caption = "无效日期!"
m_yxq.SetFocus
m_yxq.SelStart = 0
m_yxq.SelLength = Len(m_yxq.Text)
End If
Else
frm_msg.Caption = "无效日期!"
m_yxq.SetFocus
m_yxq.SelStart = 0
m_yxq.SelLength = Len(m_yxq.Text)
End If
Else
frm_msg.Caption = "无效日期!"
m_yxq.SetFocus
m_yxq.SelStart = 0
m_yxq.SelLength = Len(m_yxq.Text)
End If
End If
End Sub
Private Sub m_zgyh_Change()
frm_msg.Caption = ""
End Sub
Private Sub m_zgyh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_zgyh_LostFocus
End If
End Sub
Private Sub m_zgyh_LostFocus()
If Frame2.Enabled = True Then
If Not m_zgyh.Text = "" Then
If Not IsNumeric(Trim(m_zgyh.Text)) Then
frm_msg.Caption = "无效最高优惠!"
m_zgyh.SetFocus
m_zgyh.SelStart = 0
m_zgyh.SelLength = Len(Trim(m_zgyh.Text))
Else
m_qjhy.SetFocus
m_qjhy.SelStart = 0
m_qjhy.SelLength = Len(Trim(m_qjhy.Text))
End If
Else
m_zgyh = "0"
m_qjhy.SetFocus
m_qjhy.SelStart = 0
m_qjhy.SelLength = Len(Trim(m_qjhy.Text))
End If
End If
End Sub
Private Sub Timer1_Timer()
JZ_DQSJ2 = Time()
End Sub
Private Sub FLEX1_GotFocus()
On Error GoTo error1
m_hyxyh.Text = Trim(FLEX1.TextArray(FLEX1.Row * 12))
m_jfdb.Text = Trim(FLEX1.TextArray(FLEX1.Row * 12 + 1))
m_yfdw.Text = Trim(FLEX1.TextArray(FLEX1.Row * 12 + 2))
m_lxdh.Text = Trim(FLEX1.TextArray(FLEX1.Row * 12 + 3))
m_zgyh.Text = Trim(FLEX1.TextArray(FLEX1.Ro
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -