⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbdysyf.frm

📁 朋友给的
💻 FRM
字号:
VERSION 5.00
Object = "{A964BDA3-3E93-11CF-9A0F-9E6261DACD1C}#3.0#0"; "SetMe.ocx"
Begin VB.Form frmbdysyf 
   Caption         =   "保单应收应付"
   ClientHeight    =   5250
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7455
   LinkTopic       =   "Form2"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   5250
   ScaleWidth      =   7455
   Begin ResizeLibCtl.ReSize ReSize1 
      Left            =   3510
      Top             =   2430
      _Version        =   196608
      _ExtentX        =   741
      _ExtentY        =   741
      _StockProps     =   64
      Enabled         =   -1  'True
      FormMinWidth    =   0
      FormMinHeight   =   0
      FormDesignHeight=   5250
      FormDesignWidth =   7455
   End
   Begin VB.Frame Frame3 
      Height          =   885
      Left            =   135
      TabIndex        =   19
      Top             =   4275
      Width           =   7215
      Begin VB.CommandButton Command3 
         Caption         =   "删除"
         Height          =   405
         Left            =   2760
         TabIndex        =   23
         Top             =   270
         Width           =   1620
      End
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   405
         Left            =   4830
         TabIndex        =   21
         Top             =   270
         Width           =   1620
      End
      Begin VB.CommandButton Command1 
         Caption         =   "保存"
         Height          =   405
         Left            =   690
         TabIndex        =   20
         Top             =   270
         Width           =   1620
      End
   End
   Begin VB.Frame Frame1 
      Height          =   975
      Left            =   135
      TabIndex        =   0
      Top             =   15
      Width           =   7215
      Begin VB.TextBox BDH 
         Enabled         =   0   'False
         Height          =   300
         Left            =   1425
         TabIndex        =   22
         Top             =   315
         Width           =   5415
      End
      Begin VB.Label Label1 
         Caption         =   "保单号"
         Height          =   375
         Left            =   360
         TabIndex        =   1
         Top             =   405
         Width           =   1455
      End
   End
   Begin VB.Frame Frame2 
      Height          =   3255
      Left            =   135
      TabIndex        =   2
      Top             =   1005
      Width           =   7215
      Begin VB.TextBox BXGSYF 
         Height          =   300
         Left            =   4935
         TabIndex        =   17
         Top             =   2445
         Width           =   1935
      End
      Begin VB.TextBox BXGSYS 
         Height          =   300
         Left            =   1485
         TabIndex        =   16
         Top             =   2445
         Width           =   1935
      End
      Begin VB.TextBox KHYF 
         Height          =   300
         Left            =   4935
         TabIndex        =   13
         Top             =   1750
         Width           =   1935
      End
      Begin VB.TextBox KHYS 
         Height          =   300
         Left            =   1455
         TabIndex        =   12
         Top             =   1740
         Width           =   1935
      End
      Begin VB.TextBox YWYYF 
         Height          =   300
         Left            =   4935
         TabIndex        =   10
         Top             =   1055
         Width           =   1935
      End
      Begin VB.TextBox YWYYS 
         Height          =   300
         Left            =   1440
         TabIndex        =   8
         Top             =   1110
         Width           =   1935
      End
      Begin VB.TextBox KH 
         Enabled         =   0   'False
         Height          =   300
         Left            =   4935
         TabIndex        =   6
         Top             =   360
         Width           =   1935
      End
      Begin VB.TextBox BXGS 
         Enabled         =   0   'False
         Height          =   300
         Left            =   1455
         TabIndex        =   4
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label9 
         Caption         =   "应付"
         Height          =   375
         Left            =   3930
         TabIndex        =   18
         Top             =   2520
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "应收保险公司"
         Height          =   375
         Left            =   240
         TabIndex        =   15
         Top             =   2520
         Width           =   1155
      End
      Begin VB.Label Label7 
         Caption         =   "应付"
         Height          =   255
         Left            =   3930
         TabIndex        =   14
         Top             =   1905
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "应收客户"
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "应付"
         Height          =   375
         Left            =   3930
         TabIndex        =   9
         Top             =   1155
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "应收业务员"
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   1200
         Width           =   1155
      End
      Begin VB.Label Label3 
         Caption         =   "客户"
         Height          =   375
         Left            =   3930
         TabIndex        =   5
         Top             =   420
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "保险公司"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   420
         Width           =   975
      End
   End
End
Attribute VB_Name = "frmbdysyf"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


    Dim BXGSID As Long
    Dim ZKHID As String


Private Sub BDH_Click()
'Dim rs As ADODB.Recordset
'    Dim l As Integer
'    Set rs = New ADODB.Recordset
'    Dim strsql As String
'    Dim KHID, bxgsid As String
'    strsql = "select * from  VIEWBD where 保险单号='" & BDH & "'"
''    strsql = strsql & " where BDHTH " & "='" & BDH & "'"
''    rs.Open strsql, gCnn, adOpenStatic, adLockReadOnly
''       KHID = rs("YHID")
''       BXGSID = rs("BXGSID")
''       rs.Close
''      strsql = "select * from VIEWBD"
''    strsql = strsql & " where 保险公司ID" & "='" & BXGSID & "'" & "and" & " 客户ID" & "='" & KHID & "'"
'    rs.Open strsql, gCnn, adOpenStatic, adLockReadOnly
'       If Not rs.EOF Then
'
'        BXGS = rs("保险公司名称")
'        KH = rs("客户名称")
'
'        End If
'    Exit Sub
''      BXGS = rs("BXGSID")
'

    
End Sub

Private Sub BXGSYF_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then SendKeys "{Tab}"

End Sub

Private Sub BXGSYS_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then SendKeys "{Tab}"

End Sub

Private Sub Command1_Click()
    Dim rs As ADODB.Recordset
    Dim strsql As String
    Set rs = New ADODB.Recordset
    If BDH = "" Then
            MsgBox "保单号不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
    If YWYYS = "" Then
            MsgBox "业务员应收不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
        If YWYYF = "" Then
            MsgBox "应付不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
        If KHYS = "" Then
            MsgBox "客户应收不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
        
        If KHYF = "" Then
            MsgBox "应付不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
        If BXGSYS = "" Then
            MsgBox "保险公司应收不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
        If BXGSYF = "" Then
            MsgBox "应付不能为空!!", vbCritical, "系统提示"
            Exit Sub
        End If
     strsql = "select * from ysyf where bdh='" & BDH & "'"
     rs.Open strsql, gCnn, adOpenStatic, adLockReadOnly
     If Not rs.EOF Then
        If MsgBox("记录已经存在确定要修改?", vbYesNo, "系统提问") = vbNo Then
            Exit Sub
        Else
            gCnn.Execute "update ysyf set ysyf=" & Val(YWYYS) & " where khlx='1' and ysyflb='0' and bdh='" & BDH & "'"
            gCnn.Execute "update ysyf set ysyf=" & Val(YWYYF) & " where khlx='1' and ysyflb='1'and bdh='" & BDH & "'"
            gCnn.Execute "update ysyf set ysyf=" & Val(KHYS) & " where khlx='2' and ysyflb='0' and bdh='" & BDH & "'"
            gCnn.Execute "update ysyf set ysyf=" & Val(KHYF) & " where khlx='2' and ysyflb='1' and bdh='" & BDH & "'"
            gCnn.Execute "update ysyf set ysyf=" & Val(BXGSYS) & " where khlx='3' and ysyflb='0' and bdh='" & BDH & "'"
            gCnn.Execute "update ysyf set ysyf=" & Val(BXGSYF) & " where khlx='3' and ysyflb='1' and bdh='" & BDH & "'"
        End If
     Else
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','1'," & Val(YWYYS) & "," & Val(YWYYS) & ",'0','" & gUser & "')"
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','1'," & Val(YWYYF) & "," & Val(YWYYF) & ",'1','" & gUser & "')"
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','2'," & Val(KHYS) & "," & Val(KHYS) & ",'0','" & gUser & "')"
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','2'," & Val(KHYF) & "," & Val(KHYF) & ",'1','" & gUser & "')"
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','3'," & Val(BXGSYS) & "," & Val(BXGSYS) & ",'0','" & gUser & "')"
           gCnn.Execute "insert into ysyf(bdh,bxgsid,zkhid,khlx,ysyf,sy,ysyflb,czy)values('" & BDH & "','" & BXGSID & "','" & ZKHID & "','3'," & Val(BXGSYF) & "," & Val(BXGSYF) & ",'1','" & gUser & "')"
     End If
     MsgBox "保存成功", vbOKOnly, "系统提示"
     'ClearText
 

End Sub
Private Sub ClearText()
    BXGS = ""
    BDH = ""
    KH = ""
    YWYYS = ""
    YWYYF = ""
    KHYS = ""
    KHYF = ""
    BXGSYF = ""
    BXGSYS = ""
End Sub
Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
    If MsgBox("确定删除记录?", vbYesNo, "系统提问") = vbNo Then
        Exit Sub
    Else
        gCnn.Execute "delete from ysyf where bdh='" & BDH & "'"
    End If
    YWYYS = ""
    YWYYF = ""
    KHYS = ""
    KHYF = ""
    BXGSYS = ""
    BXGSYF = ""
    
        
End Sub

Private Sub Form_Load()
    If Me.WindowState = 0 Then Me.Move 0, 0, 7575, 5655
    Dim rs As ADODB.Recordset
    Dim l As Integer
    Set rs = New ADODB.Recordset
    Dim strsql As String
    BDH = Trim(frmYWEDIT.BDHTH)
    BXGS = frmYWEDIT.BXGS
    KH = frmYWEDIT.ZKH
    BXGSID = frmYWEDIT.BXGSID1
    ZKHID = frmYWEDIT.ZKHID1
    FillTXT (BDH)
End Sub
Private Sub FillTXT(code As String)
    Dim rs As ADODB.Recordset
    Dim strsql As String
    Dim i As Long
    Set rs = New ADODB.Recordset
    strsql = "select * from ysyf where bdh='" & code & "'"
    rs.Open strsql, gCnn, adOpenStatic, adLockReadOnly
    For i = 0 To rs.RecordCount - 1
        If rs("khlx") = 1 And rs("ysyflb") = 0 Then
            YWYYS = rs("ysyf")
        ElseIf rs("khlx") = 1 And rs("ysyflb") = 1 Then
            YWYYF = rs("ysyf")
        ElseIf rs("khlx") = 2 And rs("ysyflb") = 0 Then
            KHYS = rs("ysyf")
        ElseIf rs("khlx") = 2 And rs("ysyflb") = 1 Then
            KHYF = rs("ysyf")
        ElseIf rs("khlx") = 3 And rs("ysyflb") = 0 Then
            BXGSYS = rs("ysyf")
        ElseIf rs("khlx") = 3 And rs("ysyflb") = 1 Then
            BXGSYF = rs("ysyf")
        End If
        rs.MoveNext
    Next
        
    
    
    
    







End Sub

Private Sub KHYF_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then SendKeys "{Tab}"

End Sub

Private Sub KHYS_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then SendKeys "{Tab}"

End Sub

Private Sub YWYYF_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then SendKeys "{Tab}"

End Sub

Private Sub YWYYS_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then SendKeys "{tab}"
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -