分享:参照例子setAjaxOptions做移动端级联选择页面,实现四级获取值
有固定资产详情 分类词典 两个表
分类词典如图内容:
此主题相关图片如下:1.png

代码如下
Dim wb As New weui
Select Case e.Path
Case "index.htm"
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","index.htm")
With wb.AddInputGroup("form1","ipg1","固定资产资料")
With .AddSelect("资产类别","资产类别","|" & DataTables("分类词典").GetComboListString("资产类别"))
.Attribute = """
End With
With .AddSelect("资产一级分类","资产一级分类","")
.Attribute = """
End With
With .AddSelect("资产二级分类","资产二级分类","")
.Attribute = """
End With
.AddSelect("品牌","品牌","")
注意上述代码被和谐了,具体代码部分详见下图所示:

此主题相关图片如下:4.png

End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
Else
With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") '生成成功提示页
.AddButton("btn1","继续增加","index.htm")
End With
e.WriteString(wb.Build)
End If
Case "getProducts.htm"
Dim vals As String
If e.PostValues.Count = 1 Then
vals = "|" & DataTables("分类词典").GetComboListString("资产一级分类","资产类别='" & e.PostValues("资产类别") & "'")
ElseIf e.PostValues.Count = 2 Then
Dim Filter As String = "资产类别='" & e.PostValues("资产类别") & "' And 资产一级分类='" & e.PostValues("资产一级分类") & "'"
vals = "|" & DataTables("分类词典").GetComboListString("资产二级分类", Filter)
Else If e.PostValues.Count = 3 Then
Dim Filter As String = "资产类别='" & e.PostValues("资产类别") & "' And 资产一级分类='" & e.PostValues("资产一级分类") & "'and 资产二级分类='" & e.PostValues("资产二级分类") & "'"
vals = "|" & DataTables("分类词典").GetComboListString("品牌", Filter)
End If
e.WriteString(vals)
End Select
[此贴子已经被作者于2019/5/31 14:53:10编辑过]