以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  移动端开发时如何实现多选择框组件的功能呢  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=132215)

--  作者:李孝春
--  发布时间:2019/3/17
--  移动端开发时如何实现多选择框组件的功能呢
移动端开发时如何实现多选择框组件的功能呢? 

图片点击可在新窗口打开查看此主题相关图片如下:11.png
图片点击可在新窗口打开查看

移动端开发时只有一个复选列表项,

图片点击可在新窗口打开查看此主题相关图片如下:22.png
图片点击可在新窗口打开查看


有没有办法实现第一图的效果,如果能够实现,那么怎么实现呢?怎么从数据表【干警信息】中获取对应的姓名值或属性值呢?

图片点击可在新窗口打开查看此主题相关图片如下:33.png
图片点击可在新窗口打开查看

代码如下:
Dim wb As New weui
Select Case e.Path
    Case "AddNew.htm"
        If e.PostValues.Count = 0 Then
            wb.AddForm("","form1","addnew.htm")
            With wb.AddInputGroup("form1","ipg1","信息编辑")
                .AddInput("信息时间","信息时间","date") \'前一个"姓名"是ID,后一个"姓名"是标题
                .AddInput("信息类别","信息类别","text")
                .AddInput("发送对象","发送对象","text")
                .AddInput("发送人员","发送人员","text")
                .AddSelect("发送平台","发送平台","移动短信|阿里云短信")
                .AddInput("拟发送时间","拟发送时间","date")
                \'.AddInput("信息内容","信息内容","text")
                \'.AddSwitch("自动发送","自动发送").Value = "True"
            End With
            With wb.AddInputGroup("form1","ipg2","信息内容")
                .AddTextArea("信息内容",10).Placeholder = "请输入500字以内的备注"
            End With
            With wb.AddButtonGroup("form1","btg1",True)
                .Add("btn1", "确定", "submit")
            End With
            e.WriteString(wb.Build)
            
        Else
            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
            Functions.Execute("yidongduanzengjiagaozhi")
            With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页
                .AddButton("btn1","继续增加","addnew.htm")
            End With
            e.WriteString(wb.Build)
            
        End If
        
End Select
[此贴子已经被作者于2019/3/17 15:12:08编辑过]

--  作者:有点蓝
--  发布时间:2019/3/18 9:08:00
--  
内置的框架没有这种用法。需要自己使用原生的html做。或者使用一些第三方的框架做
--  作者:有点甜
--  发布时间:2019/3/18 10:56:00
--  

http://foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=132228&skin=0