📄 frm_fwxsgl.frm
字号:
frm_KHZLGL.Toolbar1.Buttons(2).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(3).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(4).Enabled = True
frm_KHZLGL.Toolbar1.Buttons(5).Enabled = True
frm_KHZLGL.Toolbar1.Buttons(6).Enabled = False
frm_KHZLGL.Toolbar1.Buttons(7).Enabled = True
frm_KHZLGL.Toolbar1.Buttons(8).Enabled = True
frm_KHZLGL.Text63.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
ElseIf Text3.Text = "已预订" Then
Text40.Text = Text6.Text
If ll = 1 Then
ListView1.SelectedItem.Text = Trim(ListView1.SelectedItem.Text) + "已预订"
Text6.Text = ListView1.SelectedItem.Text
ll = ll + 1
Else
End If
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
frm_FXXX.Adodc2.RecordSource = "select * from Table_LFXX where 楼盘名称='" + Combo1.Text + "'and 楼房名称='" + Text1.Text + "'"
frm_FXXX.Adodc2.Refresh
Set adoRs = adoCon.Execute("UPDATE Table_FWXX SET 状态= '" + Text3.Text + "',房号='" + Text6.Text + "',客户名称='" + Text23.Text + "',客户编号='" + Text24.Text + "',购订日期='" + Str(DTPicker1.Value) + "'where 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'and 房号= '" + Text40.Text + "' ")
Adodc1.Recordset.UpdateBatch
If temp = 1 Then
frm_FXXX.Text32(1).Text = Val(frm_FXXX.Text32(1).Text) + 1
c = frm_FXXX.Text32(1).Text
Set adoRs = adoCon.Execute("UPDATE Table_LFXX SET 房屋预订数= '" + c + "' where 楼盘名称='" + Combo1.Text + "' and 楼房名称='" + Text1.Text + "' ")
Else
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
d = Val(frm_FXXX.Text31(1).Text)
frm_FXXX.Adodc1.Recordset.UpdateBatch
frm_FXXX.Adodc2.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_tep.Text28.Text = "已预订"
frm_tep.Text23.Text = DTPicker1.Value
frm_tep.Text8.Text = ListView1.SelectedItem.Text
frm_tep.Text24.Text = Text23.Text
frm_tep.Text32.Text = Text24.Text
i = MsgBox(Trim(Combo1.Text) + " " + Trim(Text1.Text) + " " + Trim(Text2.Text) + " 层的房屋 已预订!!", 32, "房地产销售管理系统")
Else
End If
Else
End If
ElseIf g = 1 Then '客户换房操作
If Text3.Text = "未销售" Then
Text3.Text = "销售已审核"
Adodc1.RecordSource = "select * from Table_FWXX where 房号='" + ListView1.SelectedItem.Text + "'and 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'"
Adodc1.Refresh
Text45.Text = Text6.Text
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.SelectedItem.Text = Trim(ListView1.SelectedItem.Text) + Trim(Text44.Text)
Text6.Text = ListView1.SelectedItem.Text
Set adoRs = adoCon.Execute("UPDATE Table_FWXX SET 状态= '" + Text3.Text + "',楼房单元='" + lfdy + "',房号='" + Text6.Text + "',客户编号='" + Str(number) + "',购房合同编号='" + htbh + "',客户名称='" + name1 + "',销售代表='" + xsdb + "',销售扣率='" + Str(sskl) + "',实售金额='" + Str(sfje) + "',已付金额='" + Str(yfje) + "'where 房号='" + Text45.Text + "'and 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "' ")
' Set adoRs = adoCon.Execute("UPDATE Table_FWXX SET 状态= '" + Text3.Text + "',房号='" + Text6.Text + "',客户编号='" + Str(number) + "',购房合同编号='" + htbh + "',客户名称='" + name1 + "',销售代表='" + xsdb + "' where 房号='" + Text45.Text + "'and 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "' ")
' Adodc1.Recordset.UpdateBatch
Else
End If
frm_HFGL.Text13.Text = Combo1.Text
frm_HFGL.Text14.Text = Text2.Text
frm_HFGL.Text15.Text = Text17.Text
frm_HFGL.Text16.Text = Text34.Text
frm_HFGL.Text17.Text = Text6.Text
frm_HFGL.Text18.Text = Text19.Text
frm_HFGL.Text6.Text = Text29.Text
frm_HFGL.Text20.Text = Adodc1.Recordset.Fields("room_tep")
Set adoRs = adoCon.Execute("select * from Table_KHZL where 客户编号='" + Text40.Text + "'")
frm_HFGL.Text1 = adoRs.Fields("客户编号")
frm_HFGL.Text2 = adoRs.Fields("客户名称")
frm_HFGL.Text3 = adoRs.Fields("联系电话")
frm_HFGL.Text4 = adoRs.Fields("联系地址")
frm_HFGL.Text5 = adoRs.Fields("身份证")
frm_HFGL.Show
g = 0
frm_HFGL.Height = 5670
frm_HFGL.Width = 6630
frm_HFGL.Left = 3000
frm_HFGL.Top = 1200
Else
End If
Else
End If
ElseIf KeyCode = 120 Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
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
Text3.Text = ""
ElseIf KeyCode = 121 Then
temp = 2
If Text3.Text = "未销售" Then
Text3.Text = "销售未审核"
Text20.SetFocus
Text20.Locked = False
Text21.Locked = False
Text29.Locked = False
Text31.Locked = False
Command2.Enabled = True
Toolbar1.Buttons(1).Enabled = False
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 Text3.Text = "已预订" Then
frm_FXXX.Adodc1.RecordSource = "select * from Table_LPXX"
frm_FXXX.Adodc1.Refresh
frm_FXXX.Adodc2.RecordSource = "select * from Table_LFXX"
frm_FXXX.Adodc2.Refresh
Text3.Text = "销售未审核"
Text20.SetFocus
Text20.Locked = False
Text21.Locked = False
Text29.Locked = False
Text31.Locked = False
Command2.Enabled = False
Toolbar1.Buttons(1).Enabled = False
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
Else
End If
End If
End Sub
Private Sub Form_Load()
bb = 1
g = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDI_main.Toolbar1.Visible = True
Unload Me
End Sub
Private Sub Label3_Click()
frm_tep.Show
End Sub
Private Sub ListView1_Click()
If g = 0 Then
Label33.Caption = " 当前房屋: " + Trim(Text32.Text) + " " + Trim(Text34.Text) + " " + Trim(Text2.Text) + " 层 " + ListView1.SelectedItem.Text + " 号房屋"
Adodc1.RecordSource = "select * from Table_FWXX where 房号='" + ListView1.SelectedItem.Text + "'and 楼层='" + Text2.Text + "'and 楼房名称='" + Text1.Text + "' and 楼盘名称= '" + Combo1.Text + "'"
Adodc1.Refresh
If Text37.Text = "未销售" Then
Command2.Enabled = True
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
Toolbar1.Buttons(6).Enabled = True
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = False
Toolbar1.Buttons(10).Enabled = True
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text31.Text = ""
Text3.Text = Adodc1.Recordset.Fields("状态")
Text4.Text = Adodc1.Recordset.Fields("楼层")
Text5.Text = Adodc1.Recordset.Fields("楼房单元")
Text6.Text = Adodc1.Recordset.Fields("房号")
Text7.Text = Adodc1.Recordset.Fields("房型")
Text8.Text = Adodc1.Recordset.Fields("房屋高度")
Text9.Text = Adodc1.Recordset.Fields("楼房朝向")
Text10.Text = Adodc1.Recordset.Fields("房间形式")
Text11.Text = Adodc1.Recordset.Fields("附属房产")
Text12.Text = Adodc1.Recordset.Fields("阳台产权面积")
Text13.Text = Adodc1.Recordset.Fields("附属房产总价")
Text14.Text = Adodc1.Recordset.Fields("房屋销售面积")
Text15.Text = Adodc1.Recordset.Fields("套内建筑面积")
Text16.Text = Adodc1.Recordset.Fields("公用分摊面积")
Text17.Text = Adodc1.Recordset.Fields("销售单价")
Text19.Text = Adodc1.Recordset.Fields("房产总价")
Text18.Text = Adodc1.Recordset.Fields("房屋备注")
ElseIf Text37.Text = "销售未审核" Then
If Trim(Adodc1.Recordset.Fields("客户编号")) <> "" Then
Adodc3.RecordSource = "select * from Table_KHZL where 客户编号='" + Str(Adodc1.Recordset.Fields("客户编号")) + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Text25.Text = Adodc3.Recordset.Fields("邮编")
Text26.Text = Adodc3.Recordset.Fields("联系地址")
Text27.Text = Adodc3.Recordset.Fields("身份证")
Text28.Text = Adodc3.Recordset.Fields("联系电话")
Else
End If
End If
Command2.Enabled = False
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = True
Toolbar1.Buttons(9).Enabled = True
Toolbar1.Buttons(10).Enabled = True
Text3.Text = Adodc1.Recordset.Fields("状态")
Text4.Text = Adodc1.Recordset.Fields("楼层")
Text5.Text = Adodc1.Recordset.Fields("楼房单元")
Text6.Text = Adodc1.Recordset.Fields("房号")
Text7.Text = Adodc1.Recordset.Fields("房型")
Text8.Text = Adodc1.Recordset.Fields("房屋高度")
Text9.Text = Adodc1.Recordset.Fields("楼房朝向")
Text10.Text = Adodc1.Recordset.Fields("房间形式")
Text11.Text = Adodc1.Recordset.Fields("附属房产")
Text12.Text = Adodc1.Recordset.Fields("阳台产权面积")
Text13.Text = Adodc1.Recordset.Fields("附属房产总价")
Text14.Text = Adodc1.Recordset.Fields("房屋销售面积")
Text15.Text = Adodc1.Recordset.Fields("套内建筑面积")
Text16.Text = Adodc1.Recordset.Fields("公用分摊面积")
Text17.Text = Adodc1.Recordset.Fields("销售单价")
Text19.Text = Adodc1.Recordset.Fields("房产总价")
Text18.Text = Adodc1.Recordset.Fields("房屋备注")
Text20.Text = Adodc1.Recordset.Fields("销售扣率")
Text21.Text = Adodc1.Recordset.Fields("实售金额")
Text22.Text = Adodc1.Recordset.Fields("已付金额")
Text23.Text = Adodc1.Recordset.Fields("客户名称")
DTPicker1.Value = Adodc1.Recordset.Fields("购订日期")
Text29.Text = Adodc1.Recordset.Fields("购房合同编号")
Combo2.Text = Adodc1.Recordset.Fields("销售代表")
Text31.Text = Adodc1.Recordset.Fields("销售备注")
Text24.Text = Adodc1.Recordset.Fields("客户编号")
ElseIf Text37.Text = "销售已审核" Then
Command2.Enabled = False
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = True
Toolbar1.Buttons(8).Enabled = True
Toolbar1.Buttons(9).Enabled = False
Toolbar1.Buttons(10).Enabled = True
Text3.Text = Adodc1.Recordset.Fields("状态")
Text4.Text = Adodc1.Recordset.Fields("楼层")
Text5.Text = Adodc1.Recordset.Fields("楼房单元")
Text6.Text = Adodc1.Recordset.Fields("房号")
Text7.Text = Adodc1.Recordset.Fields("房型")
Text8.Text = Adodc1.Recordset.Fields("房屋高度")
Text9.Text = Adodc1.Recordset.Fields("楼房朝向")
Text10.Text = Adodc1.Recordset.Fields("房间形式")
Text11.Text = Adodc1.Recordset.Fields("附属房产")
Text12.Text = Adodc1.Recordset.Fields("阳台产权面积")
Text13.Text = Adodc1.Recordset.Fields("附属房产总价")
Text14.Text = Adodc1.Recordset.Fields("房屋销售面积")
Text15.Text = Adodc1.Recordset.Fields("套内建筑面积")
Text16.Text = Adodc1.Recordset.Fields("公用分摊面积")
Text17.Text = Adodc1.Recordset.Fields("销售单价")
Text19.Text = Adodc1.Recordset.Fields("房产总价")
Text18.Text = Adodc1.Recordset.Fields("房屋备注")
Text20.Text = Adodc1.Recordset.Fields("销售扣率")
Text21.Text = Adodc1.Recordset.Fields("实售金额")
Text22.Text = Adodc1.Recordset.Fields("已付金额")
Text23.Text = Adodc1.Recordset.Fields("客户名称")
DTPicker1.Value = Adodc1.Recordset.Fields("购订日期")
Text29.Text = Adodc1.Recordset.Fields("购房合同编号")
Combo2.Text = Adodc1.Recordset.Fields("销售代表")
Text31.Text = Adodc1.Recordset.Fields("销售备注")
Text24.Text = Adodc1.Recordset.Fields("客户编号")
Adodc3.RecordSource = "select * from Table_KHZL where 客户编号='" + Str(Adodc1.Recordset.Fields("客户编号")) + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Text25.Text = Adodc3.Recordset.Fields("邮编")
Text26.Text = Adodc3.Recordset.Fields("联系地址")
Text27.Text = Adodc3.Recordset.Fields("身份证")
Text28.Text = Adodc3.Recordset.Fields("联系电话")
Else
End If
ElseIf Text37.Text = "已预订" Then
Command2.Enabled = False
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = False
Toolbar1.Buttons(10).Enabled = True
Combo2.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -