📄 frm_fwxsgl.frm
字号:
Left = 120
TabIndex = 46
Top = 530
Width = 975
End
Begin VB.Label Label22
Caption = "已付金额"
Height = 255
Left = 3840
TabIndex = 44
Top = 220
Width = 735
End
Begin VB.Label Label21
Caption = "金额"
Height = 255
Left = 2160
TabIndex = 42
Top = 220
Width = 615
End
Begin VB.Label Label20
Caption = "实售扣率"
Height = 255
Left = 120
TabIndex = 40
Top = 220
Width = 735
End
End
Begin MSAdodcLib.Adodc Adodc4
Height = 375
Left = 3960
Top = 3000
Visible = 0 'False
Width = 2295
_ExtentX = 4048
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_LFXX"
Caption = "Adodc4"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Left = 1560
TabIndex = 83
Top = 2280
Width = 975
End
Begin VB.Label Label33
BackColor = &H00C0E0FF&
Height = 270
Left = 3150
TabIndex = 74
Top = 840
Width = 7905
End
End
Attribute VB_Name = "frm_FWXSGL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim aa, bb, cc, DD, ee, ff, gg
Dim itmX As ListItem '定义一个ListItem对象
Dim i, g, tep1, tep2
Dim a, B, e, f, h, ll
Dim c, d As Integer
Dim key, str1 As String
Dim temp As Integer
Public adoCon As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Dim number As Long
Dim sskl, sfje, yfje, fczj As Long
Dim name1, htbh, xsdb, lfdy
Private Sub Combo1_Click()
ListView2.Enabled = False
Text1.Text = ""
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
Adodc1.RecordSource = "select * from Table_LFXX where 楼盘名称='" + Combo1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView2.Enabled = True
ListView2.ListItems.Clear
Do While Adodc1.Recordset.EOF = False
key = Adodc1.Recordset.Fields("楼房名称")
Set itmX = ListView2.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
ListView2.SetFocus
Text32.Text = Combo1.Text
Else
ListView2.Enabled = False
End If
End Sub
Private Sub Command1_Click()
Adodc3.RecordSource = "select * from Table_KHZL where 客户编号='" + Trim(Text24.Text) + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
frm_KHZLGL.Show
frm_FWXSGL.Hide
frm_KHZLGL.Text53.Text = Adodc3.Recordset.Fields("客户编号")
frm_KHZLGL.Text54.Text = Adodc3.Recordset.Fields("客户名称")
frm_KHZLGL.Text55.Text = Adodc3.Recordset.Fields("联系地址")
frm_KHZLGL.Text56.Text = Adodc1.Recordset.Fields("楼盘名称")
frm_KHZLGL.Text57.Text = Adodc1.Recordset.Fields("楼房名称")
frm_KHZLGL.Text58.Text = Adodc1.Recordset.Fields("楼房单元")
frm_KHZLGL.Text59.Text = Adodc1.Recordset.Fields("楼层")
frm_KHZLGL.Text60.Text = Adodc1.Recordset.Fields("房号")
frm_KHZLGL.Text64.Text = Adodc1.Recordset.Fields("房产总价")
frm_KHZLGL.Text65.Text = Adodc1.Recordset.Fields("已付金额")
'frm_KHZLGL.Text66.Text = Adodc1.Recordset.Fields("未付金额")
frm_KHZLGL.Toolbar1.Buttons(1).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(2).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(3).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(4).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(5).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(6).Enabled = True
frm_KHZLGL.Toolbar1.Buttons(7).Enabled = True
frm_KHZLGL.Toolbar1.Buttons(8).Enabled = True
frm_KHZLGL.Text63.Locked = False
frm_KHZLGL.Text65.Locked = False
frm_KHZLGL.Text67.Locked = False
frm_KHZLGL.SSTab1.Tab = 2
frm_KHZLGL.Height = 7530
frm_KHZLGL.Width = 11900
frm_KHZLGL.Left = 10
frm_KHZLGL.Top = 50
frm_KHZLGL.Text61.Locked = False
frm_KHZLGL.Text61.SetFocus
Else
MsgBox "数据录入错误,不能付款", 48, "房地产销售管理系统"
End If
End Sub
Private Sub Command2_Click()
frm_khzl.Show
frm_khzl.Left = 5300
frm_khzl.Top = 3260
End Sub
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text29.SetFocus
Else
End If
End Sub
Private Sub Form_Activate()
If bb = 1 Then
'aa = frm_FXXX.Text22(0).Text
Adodc2.RecordSource = "select * from Table_LPXX"
Adodc2.Refresh
Do While Adodc2.Recordset.EOF = False
Combo1.AddItem (Adodc2.Recordset.Fields("楼盘名称").Value)
Adodc2.Recordset.MoveNext
Loop
bb = bb + 1
Else
End If
Combo2.Clear
Adodc1.RecordSource = "select * from Table_YGXX order by 员工姓名 "
Adodc1.Refresh
Do While Adodc1.Recordset.EOF = False
tep1 = Adodc1.Recordset.Fields("员工姓名").Value
If tep1 <> tep2 Then
Combo2.AddItem (tep1)
tep2 = tep1
Adodc1.Recordset.MoveNext
ElseIf tep1 = tep2 Then
Adodc1.Recordset.MoveNext
End If
Loop
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 117 Then
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = True
Toolbar1.Buttons(10).Enabled = True
ElseIf KeyCode = 118 Then
i = MsgBox("您确认要退房吗?", 17, "房地产销售管理系统")
If i = vbOK Then
temp = 4
Adodc1.RecordSource = "select * from Table_FWXX where 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'and 房号= '" + Text6.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set adoRs = adoCon.Execute("UPDATE Table_FWXX SET 状态= '未销售',房号='" + Adodc1.Recordset.Fields("room_tep") + "',客户名称='',客户编号=0,销售代表='',销售备注='',销售扣率=0,实售金额=0,已付金额=0,购房合同编号='',购订日期='" + Str(DTPicker1.Value) + "'where 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'and 房号= '" + Text6.Text + "'")
Adodc4.RecordSource = "select * from Table_LFXX where 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'"
Adodc4.Refresh
If Adodc4.Recordset.RecordCount > 0 Then
c = Val(Adodc4.Recordset.Fields("出售数量"))
c = c - 1
Set adoRs = adoCon.Execute("UPDATE Table_LFXX SET 出售数量= '" + Str(c) + "' where 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'")
Set adoRs = adoCon.Execute("UPDATE Table_KHZL SET 已付金额= '',未付金额='' where 客户编号='" + Str(Adodc1.Recordset.Fields("客户编号")) + "'")
End If
MsgBox "退房成功,请您办理退款手续!!!", 48, "房地产销售管理系统"
frm_FWXSGL.Hide
frm_KHTKDGL.Show
frm_KHTKDGL.Height = 7290
frm_KHTKDGL.Width = 11295
frm_KHTKDGL.Left = 300
frm_KHTKDGL.Top = 150
frm_KHTKDGL.Text12.Text = Text22.Text
frm_KHTKDGL.Toolbar1.Buttons(2).Enabled = True
frm_KHTKDGL.Toolbar1.Buttons(3).Enabled = False
frm_KHTKDGL.Toolbar1.Buttons(4).Enabled = True
frm_KHTKDGL.Toolbar1.Buttons(5).Enabled = False
frm_KHTKDGL.Toolbar1.Buttons(6).Enabled = True
frm_KHTKDGL.Toolbar1.Buttons(7).Enabled = False
frm_KHTKDGL.Toolbar1.Buttons(8).Enabled = True
frm_KHTKDGL.Text10.SetFocus
Else
End If
End If
ElseIf KeyCode = 119 Then
Dim Temp1
Temp1 = Text6.Text
If g = 0 Then
If Text3.Text = "销售未审核" Then
Text40.Text = Text6.Text
frm_FWXSGL.Adodc1.RecordSource = "select * from Table_FWXX where 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'and 房号= '" + Text40.Text + "'"
frm_FWXSGL.Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.SelectedItem.Text = Trim(Adodc1.Recordset.Fields("room_tep")) + Trim(Text23.Text)
Text6.Text = ListView1.SelectedItem.Text
Set adoRs = adoCon.Execute("UPDATE Table_FWXX SET 状态= '" + Text3.Text + "',房号='" + Text6.Text + "',客户名称='" + Text23.Text + "',客户编号='" + Text24.Text + "',销售代表='" + Combo2.Text + "',销售备注='" + Text31.Text + "',销售扣率='" + Text20.Text + "',实售金额='" + Text21.Text + "',购房合同编号='" + Text29.Text + "',购订日期='" + Str(DTPicker1.Value) + "'where 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'and 房号= '" + Text40.Text + "' ")
Adodc1.Recordset.UpdateBatch
frm_KHZLGL.Text57.Text = Adodc1.Recordset.Fields("楼房名称")
frm_KHZLGL.Text58.Text = Adodc1.Recordset.Fields("楼房单元")
frm_KHZLGL.Text59.Text = Adodc1.Recordset.Fields("楼层")
frm_KHZLGL.Text60.Text = Adodc1.Recordset.Fields("room_tep")
frm_KHZLGL.Text64.Text = Adodc1.Recordset.Fields("房产总价")
frm_KHZLGL.Text56.Text = Adodc1.Recordset.Fields("楼盘名称")
frm_FXXX.Adodc2.RecordSource = "select * from Table_LFXX where 楼盘名称='" + Combo1.Text + "'and 楼房名称='" + Text1.Text + "'"
frm_FXXX.Adodc2.Refresh
If frm_FXXX.Adodc2.Recordset.RecordCount > 0 Then
i = Len(Temp1)
str1 = Mid$(Temp1, i - 2, 3)
If str1 = "已预订" Then
c = Val(frm_FXXX.Adodc2.Recordset.Fields("出售未审核"))
c = c + 1
d = Val(frm_FXXX.Adodc2.Recordset.Fields("房屋预订数"))
d = d - 1
Set adoRs = adoCon.Execute("UPDATE Table_LFXX SET 出售未审核= '" + Str(c) + "',房屋预订数= '" + Str(d) + "' where 楼盘名称='" + Combo1.Text + "' and 楼房名称='" + Text1.Text + "' ")
Else
c = Val(frm_FXXX.Adodc2.Recordset.Fields("出售未审核"))
c = c + 1
Set adoRs = adoCon.Execute("UPDATE Table_LFXX SET 出售未审核= '" + Str(c) + "' where 楼盘名称='" + Combo1.Text + "' and 楼房名称='" + Text1.Text + "' ")
End If
End If
frm_FXXX.Adodc2.Recordset.UpdateBatch
frm_FXXX.Adodc1.RecordSource = "select * from Table_LPXX"
frm_FXXX.Adodc1.Refresh
frm_FXXX.Adodc2.RecordSource = "select * from Table_LFXX"
frm_FXXX.Adodc2.Refresh
frm_tep.Text23.Text = DTPicker1.Value
frm_tep.Text25.Text = frm_FWXSGL.Text20.Text
frm_tep.Text26.Text = frm_FWXSGL.Text21.Text
frm_tep.Text27.Text = frm_FWXSGL.Text22.Text
frm_tep.Text24.Text = Text23.Text
frm_tep.Text32.Text = Text24.Text
frm_tep.Text8.Text = ListView1.SelectedItem.Text
frm_tep.Text28.Text = Text3.Text
frm_tep.Text22.Text = frm_FWXSGL.Text29.Text
frm_tep.Text30.Text = frm_FWXSGL.Combo2.Text
frm_tep.Text31.Text = frm_FWXSGL.Text31.Text
Else
End If
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = True
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = False
Toolbar1.Buttons(10).Enabled = True
Text21.SetFocus
MsgBox "房屋销售成功,请您到付款安排中付款!!", 48, "房屋销售管理系统"
frm_KHZLGL.Toolbar1.Buttons(4).Enabled = False
Adodc3.RecordSource = "select * from Table_KHZL where 客户编号='" + Text24.Text + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
frm_KHZLGL.Show
frm_FWXSGL.Hide
frm_tep.Text33.Text = Adodc3.Recordset.Fields("购房数量")
frm_KHZLGL.Text53.Text = Adodc3.Recordset.Fields("客户编号")
frm_KHZLGL.Text54.Text = Adodc3.Recordset.Fields("客户名称")
frm_KHZLGL.Text55.Text = Adodc3.Recordset.Fields("联系地址")
frm_KHZLGL.Toolbar1.Buttons(1).Enabled = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -