Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim div As String = FileSys.ReadAllText(ProjectPath & "\qz.txt")
wb.AddForm("", "form1", "test.htm")
With wb.AddInputGroup("form1", "page1", "基本资料")
.AddInput("xm", "姓名", "text") '常规语法增加输入框
With .AddInputCell("ic1") '通过InputCell增加输入框
.AddLabel("lnl", "年龄", 0) '增加标签,0显示在左边
.AddInput("nl", "number", 1) '增加输入框,1表示显示在中间
End With
With .AddInputCell("ic2", 1) '通过InputCell增加输入框,1表示突出显示
.AddLabel("lkh", "卡号", 0) '增加标签,0显示在左边
.AddInput("kh", "number", 1).PlaceHolder = "请输入卡号" '增加输入框,1表示显示在中间
End With
With .AddInputCell("ic3", 2) '通过InputCell增加输入框, 2表示突出显示(含图标)
.AddLabel("lmm", "密码", 0) '增加标签,0显示在左边
.AddInput("mm", "text", 1).PlaceHolder = "请输入密码" '增加输入框,1表示显示在中间
End With
With wb.AddButtonGroup("form1", "page2", False)
wb.InsertHTML(div)
.Add("reset", "重写", "button")
.Add("yes", "确定", "submit").FormAction = "qzb.htm"
End With
With wb.AddInputGroup("form1", "page3", "签字确认")
.AddHiddenValue("qzxx", "")
wb.InsertHTML("<div id='someelement'></div>")
End With
End With
e.WriteString(wb.Build) '生成网页
' Case "qzb.htm"
' Dim qzxxs As String = e.Values("qzxx")
' Dim fsj As String = "姓名:" & e.Values("xm") & " 年龄:" & e.Values("nl") & " 卡号:" & e.Values("kh") & " 密码:" & e.Values("mm") & " 手机:" & e.Values("sj") & " 电话:" & e.Values("sh")
' If qzxxs.StartsWith("image/png;base64") And qzxxs.Length > 50 Then
' With wb.AddToast("", "t1", "提交成功!", 0)
' .Msec = 1000
' .Icon = "success"
' End With
' With wb.AddArticle("", "page1")
' .AddImage("data:" & e.Values("qzxx"))
' .AddContent("确认时间" & Date.Now)
' End With
' Dim j As DataRow = DataTables("签字记录").AddNew
' j("签字数据") = e.Values("qzxx")
' j("签字日期") = Date.Now
' j("提交信息") = fsj
' j.Save
' Else
' wb.AddPageTitle("", "ph2", "提交失败", "无签名数据!")
' With wb.AddToast("", "t2", "无签名数据" & Chr(13) & Chr(10) & "提交失败!", 0)
' .Msec = 1000
' .Icon = "warn"
' End With
' End If
' e.WriteString(wb.Build)