Select Case e.Path
Case "xkf.htm"
wb.AddPageTitle("","pageheader","客户报备","艾迪尔国际家居")
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","xkf.htm")
With wb.AddInputGroup("form1","ipg1","新客户报备窗口")
.AddInput("建档日期","建档日期","date")
.AddInput("建档人员","报备人","Text")
'.AddInput("来源备注","来源备注","Text")
'.AddInput("其他备注","其他备注","Text")
''.AddSwitch("上门客","上门客").Value = "True"
'.AddSwitch("上门客","上门客").Value = "True"
此主题相关图片如下:1512744825(1).jpg
End With
With wb.AddInputGroup("form1","ipg3","信息报备")
.AddInput("推荐人","推荐人","Text")
.AddInput("推荐人电话","推荐人电话","number") 如果数据库里有重复的 需要提示
.AddInput("客户姓名","客户姓名","Text") '前一个"姓名"是ID,后一个"姓名"是标题
.AddInput("客户电话","客户电话","number")如果数据库里有重复的 需要提示
.AddInput("客户微信","客户微信","Text")
.AddInput("楼盘名称","楼盘名称","Text")
.AddInput("房号","房号","Text")
.AddInput("新房面积","新房面积","number")
.AddSelect("户型","户型","请选择|大平层|别墅|自建房|其他")
.AddSelect("客户来源","客户来源","请选择|设计师|门店客流|肄业介绍|其他")
.AddSelect("参观历史","参观历史","请选择|国际馆|家居门店|历史案例|其他同行|未知")
.AddTextArea("来源备注",3).Placeholder = "更多客户信息备注信息"
End With
With wb.AddRadioGroup("form1","风格偏好","风格偏好")
.Add("轻奢木里","轻奢木里")
.Add("经典名匠","经典名匠")
.Add("古典国振","古典国振")
End With
With wb.AddCheckGroup("form1","服务需求","服务需求")
.Add("全案服务","全案服务")
.Add("木作定制","木作定制")
.Add("软装设计","软装设计")
.Add("家具采购","家具采购")
End With
With wb.AddInputGroup("form1","ipg2","总结备注")
.AddTextArea("其他备注",5).Placeholder = "请输入200字以内的备注"
End With
With wb.AddInputGroup("form1","ipg4","客户资料请发 icasa@icwood.top 邮箱")
'.AddUploader("up1","客户资料",True) 'True表示允许上传多个文件
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
Else
Dim nms() As String = {"客户姓名","建档日期","建档人员","楼盘名称","房号"} '不能为空的列名数组
'Dim nms() As String = {"客户姓名","客户电话","建档日期","建档人员","来源备注","楼盘名称","房号"} '不能为空的列名数组
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then '生成错误提示页
With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return '必须返回
End If
Next
nms = New String() {"客户姓名","客户电话","建档日期","建档人员","户型","客户微信","参观历史","新房面积","客户来源","来源备注","楼盘名称","房号","新房面积","其他备注","推荐人电话","风格偏好","推荐人"} '重新定义了nms数组,增加了两列.
Dim dr As DataRow = DataTables("终端用户").AddNew()
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
dr(nm) = e.PostValues(nm)
End If
Next
'以下代码处理品牌复选列表项
Dim pp As String
nms = New String() {"木作定制","家具采购","软装设计","全案服务"} '将nms重新定义为品牌数组
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) AndAlso e.PostValues(nm).Trim() = "on" Then '不能省略Trim
pp = pp & nm & ","
End If
Next
If pp > "" Then
dr("服务需求") = pp.Trim(",")
End If
'For Each key As String In e.Files.Keys
'If key = "up1" Then
'For Each fln As String In e.Files(key)
'e.SaveFile(key, fln, ProjectPath & "Attachments\" & fln)
'Next
'dr.Lines("客户资料") = e.Files(key)
'End If
'Next
'保存并生成增加成功提示页面
dr.save()
wb.InsertHTML("接收到的数据有:<br/>")
For Each key As String In e.PostValues.Keys
wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>")
Next
With wb.AddMsgPage("","msgpage","增加成功", "好好加油,天天开单") '生成成功提示页
.AddButton("btn1","继续增加","xkf.htm")
End With
e.WriteString(wb.Build)
End If
End Select